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 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 annotationType, } } - private static void assertNonPrivate(Class 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 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 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 provideArguments(String... methodNames) { - return provideArguments(TestCase.class, null, false, methodNames); + private Stream provideArguments(String... factoryMethodNames) { + return provideArguments(TestCase.class, null, false, factoryMethodNames); + } + + private Stream provideArguments(Method testMethod, String factoryMethodName) { + return provideArguments(TestCase.class, testMethod, false, factoryMethodName); } private Stream provideArguments(Class testClass, Method testMethod, boolean allowNonStaticMethod, - String... methodNames) { + String... factoryMethodNames) { if (testMethod == null) { try { + class DummyClass { + @SuppressWarnings("unused") + public void dummyMethod() { + }; + } // ensure we have a non-null method, even if it's not a real test method. - testMethod = getClass().getMethod("toString"); + testMethod = DummyClass.class.getMethod("dummyMethod"); } catch (Exception ex) { throw new RuntimeException(ex); @@ -449,7 +699,7 @@ private Stream provideArguments(Class testClass, Method testMethod, var methodSource = mock(MethodSource.class); - when(methodSource.value()).thenReturn(methodNames); + when(methodSource.value()).thenReturn(factoryMethodNames); var extensionContext = mock(ExtensionContext.class); when(extensionContext.getTestClass()).thenReturn(Optional.of(testClass)); @@ -472,21 +722,58 @@ private Stream provideArguments(Class testClass, Method testMethod, static class DefaultFactoryMethodNameTestCase { - static final String TEST_METHOD = "testDefaultFactoryMethodName"; + // Test + void testDefaultFactoryMethodName(String param) { + } + // Factory static Stream testDefaultFactoryMethodName() { return Stream.of("foo", "bar"); } + } - void testDefaultFactoryMethodName(String param) { + static class MultipleDefaultFactoriesTestCase { + + // Test + void test(String param) { + } + + // Factory + static Stream test() { + return Stream.of(); + } + + // Another Factory + static Stream test(int num) { + return Stream.of(); + } + } + + static class MultipleInvalidDefaultFactoriesTestCase { + + // Test + void test(String param) { + } + + // NOT a Factory + static String test() { + return null; + } + + // Also NOT a Factory + static Object test(int num) { + return null; } } static class TestCase { + void test() { + } + // --- Invalid --------------------------------------------------------- - static Object providerWithIllegalReturnType() { + static Object factoryWithInvalidReturnType() { return -1; } @@ -500,6 +787,16 @@ static Stream stringStreamProviderWithParameter(String parameter) { return Stream.of("foo" + parameter, "bar" + parameter); } + static Stream stringStreamProviderWithArrayParameter(String[] parameter) { + String suffix = Arrays.stream(parameter).collect(Collectors.joining()); + return Stream.of("foo " + suffix, "bar " + suffix); + } + + static Stream stringStreamProviderWithArrayParameter(int[] parameter) { + return stringStreamProviderWithArrayParameter( + Arrays.stream(parameter).mapToObj(String::valueOf).toArray(String[]::new)); + } + static Stream stringStreamProviderWithOrWithoutParameter() { return stringStreamProvider(); } @@ -508,6 +805,14 @@ static Stream stringStreamProviderWithOrWithoutParameter(String paramete return stringStreamProviderWithParameter(parameter); } + static Stream stringStreamProviderWithOrWithoutParameter(String parameter1, String parameter2) { + return stringStreamProviderWithParameter(parameter1 + parameter2); + } + + // Overloaded method, but not a valid return type for a factory method + static void stringStreamProviderWithOrWithoutParameter(String parameter1, int parameter2) { + } + // @ParameterizedTest // @MethodSource // use default, inferred factory method void overloadedStringStreamProvider(Object parameter) { @@ -635,6 +940,10 @@ Stream nonStaticStringStreamProvider() { static class ExternalFactoryMethods { + static Object factoryWithInvalidReturnType() { + return -1; + } + static Stream stringsProvider() { return Stream.of("string1", "string2"); } @@ -660,4 +969,30 @@ public Object resolveParameter(ParameterContext parameterContext, ExtensionConte } } + static class StringArrayResolver implements ParameterResolver { + + @Override + public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { + return parameterContext.getParameter().getType() == String[].class; + } + + @Override + public String[] resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { + return new String[] { ":", ")" }; + } + } + + static class IntArrayResolver implements ParameterResolver { + + @Override + public boolean supportsParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { + return parameterContext.getParameter().getType() == int[].class; + } + + @Override + public int[] resolveParameter(ParameterContext parameterContext, ExtensionContext extensionContext) { + return new int[] { 4, 2 }; + } + } + } diff --git a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MockCsvAnnotationBuilder.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MockCsvAnnotationBuilder.java index 7fca4048c19a..629709cbb17b 100644 --- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MockCsvAnnotationBuilder.java +++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/MockCsvAnnotationBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This 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/ValueArgumentsProviderTests.java b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/ValueArgumentsProviderTests.java index 835aec70bcfa..b9416ba418ce 100644 --- a/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/ValueArgumentsProviderTests.java +++ b/junit-jupiter-params/src/test/java/org/junit/jupiter/params/provider/ValueArgumentsProviderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This 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/kotlin/ParameterizedTestNameFormatterIntegrationTests.kt b/junit-jupiter-params/src/test/kotlin/ParameterizedTestNameFormatterIntegrationTests.kt new file mode 100644 index 000000000000..829f98aefabc --- /dev/null +++ b/junit-jupiter-params/src/test/kotlin/ParameterizedTestNameFormatterIntegrationTests.kt @@ -0,0 +1,62 @@ +/* + * Copyright 2015-2023 the original author or 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 org.junit.jupiter.api.Assertions.assertEquals +import org.junit.jupiter.api.TestInfo +import org.junit.jupiter.params.ParameterizedTest +import org.junit.jupiter.params.provider.ValueSource + +class ParameterizedTestNameFormatterIntegrationTests { + + @ValueSource(strings = ["foo", "bar"]) + @ParameterizedTest + fun defaultDisplayName(param: String, info: TestInfo) { + if (param.equals("foo")) { + assertEquals("[1] foo", info.displayName) + } else { + assertEquals("[2] bar", info.displayName) + } + } + + @ValueSource(strings = ["foo", "bar"]) + @ParameterizedTest(name = "{0}") + fun `1st argument`(param: String, info: TestInfo) { + if (param.equals("foo")) { + assertEquals("foo", info.displayName) + } else { + assertEquals("bar", info.displayName) + } + } + + @ValueSource(strings = ["foo", "bar"]) + @ParameterizedTest(name = "{displayName}") + fun `it's an {enigma} '{0}'`(@Suppress("UNUSED_PARAMETER") param: String, info: TestInfo) { + assertEquals("it's an {enigma} '{0}'(String, TestInfo)", info.displayName) + } + + @ValueSource(strings = ["foo", "bar"]) + @ParameterizedTest(name = "{displayName} - {0}") + fun `displayName and 1st 'argument'`(param: String, info: TestInfo) { + if (param.equals("foo")) { + assertEquals("displayName and 1st 'argument'(String, TestInfo) - foo", info.displayName) + } else { + assertEquals("displayName and 1st 'argument'(String, TestInfo) - bar", info.displayName) + } + } + + @ValueSource(strings = ["foo", "bar"]) + @ParameterizedTest(name = "{0} - {displayName}") + fun `1st 'argument' and displayName`(param: String, info: TestInfo) { + if (param.equals("foo")) { + assertEquals("foo - 1st 'argument' and displayName(String, TestInfo)", info.displayName) + } else { + assertEquals("bar - 1st 'argument' and displayName(String, TestInfo)", info.displayName) + } + } +} diff --git a/junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessorKotlinTests.kt b/junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessorKotlinTests.kt index 6c1aa9e2e84a..17d9bb150a9e 100644 --- a/junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessorKotlinTests.kt +++ b/junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessorKotlinTests.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/kotlin/org/junit/jupiter/params/aggregator/DisplayNameTests.kt b/junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/DisplayNameTests.kt index 080eeb2c8dd7..96b717ad5044 100644 --- a/junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/DisplayNameTests.kt +++ b/junit-jupiter-params/src/test/kotlin/org/junit/jupiter/params/aggregator/DisplayNameTests.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-platform-commons/junit-platform-commons.gradle.kts b/junit-platform-commons/junit-platform-commons.gradle.kts index 54ffb5efc50e..393d655e86d7 100644 --- a/junit-platform-commons/junit-platform-commons.gradle.kts +++ b/junit-platform-commons/junit-platform-commons.gradle.kts @@ -1,3 +1,5 @@ +import org.junit.gradle.java.ExecJarAction + plugins { `java-library-conventions` `java-multi-release-sources` @@ -16,18 +18,19 @@ dependencies { tasks.jar { val release9ClassesDir = sourceSets.mainRelease9.get().output.classesDirs.singleFile inputs.dir(release9ClassesDir).withPathSensitivity(PathSensitivity.RELATIVE) - doLast { - exec { - executable = project.the().launcherFor(java.toolchain).get() - .metadata.installationPath.file("bin/jar").asFile.absolutePath - args( - "--update", - "--file", archiveFile.get().asFile.absolutePath, - "--release", "9", - "-C", release9ClassesDir.absolutePath, "." - ) - } - } + doLast(objects.newInstance(ExecJarAction::class).apply { + javaLauncher.set(javaToolchains.launcherFor(java.toolchain)) + args.addAll( + "--update", + "--file", archiveFile.get().asFile.absolutePath, + "--release", "9", + "-C", release9ClassesDir.absolutePath, "." + ) + }) +} + +tasks.codeCoverageClassesJar { + exclude("org/junit/platform/commons/util/ModuleUtils.class") } eclipse { diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/JUnitException.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/JUnitException.java index ae91f0e61602..20c6d94370d4 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/JUnitException.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/JUnitException.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/PreconditionViolationException.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/PreconditionViolationException.java index e5b8b91191a1..e858ad26b13d 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/PreconditionViolationException.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/PreconditionViolationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/annotation/Testable.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/annotation/Testable.java index c1b8781a09d5..476289b28110 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/annotation/Testable.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/annotation/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/junit-platform-commons/src/main/java/org/junit/platform/commons/function/Try.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/function/Try.java index c7c54f43e840..9d7c5997b532 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/function/Try.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/function/Try.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LogRecordListener.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LogRecordListener.java index d0b7feabe56a..3b0c357f5090 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LogRecordListener.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LogRecordListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/Logger.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/Logger.java index 1d5302fccc0d..5283e18d3b25 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/Logger.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/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/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LoggerFactory.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LoggerFactory.java index 511d4d897437..5e06b26fb32d 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LoggerFactory.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/logging/LoggerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/AnnotationSupport.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/AnnotationSupport.java index 657546f25c23..037c9ee509aa 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/AnnotationSupport.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/AnnotationSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ClassSupport.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ClassSupport.java index 3e6648e8c959..5039fd87c7e1 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ClassSupport.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ClassSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/HierarchyTraversalMode.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/HierarchyTraversalMode.java index 9222d590043c..aefcb1e41bf6 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/HierarchyTraversalMode.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/HierarchyTraversalMode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ModifierSupport.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ModifierSupport.java index 4e9085e35c6e..7dbb748931fa 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ModifierSupport.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ModifierSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ReflectionSupport.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ReflectionSupport.java index ae11ea789ed0..819d5809c074 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ReflectionSupport.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/ReflectionSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/SearchOption.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/SearchOption.java index 760db041aee4..005167ccfa55 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/support/SearchOption.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/support/SearchOption.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/AnnotationUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/AnnotationUtils.java index 316474484a66..9da0cb5650d6 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/AnnotationUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/AnnotationUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/BlacklistedExceptions.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/BlacklistedExceptions.java index a84c333a00ba..2c82dd500dd3 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/BlacklistedExceptions.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/BlacklistedExceptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFileVisitor.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFileVisitor.java index 2502cabed5b8..a6844206fe0d 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFileVisitor.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFileVisitor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFilter.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFilter.java index e5961ee8b869..63c15fb70da3 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFilter.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassLoaderUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassLoaderUtils.java index 5c3f332fe372..0bd035b9ecd5 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassLoaderUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassLoaderUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassNamePatternFilterUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassNamePatternFilterUtils.java index 1e1778c1b044..cea745d1568f 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassNamePatternFilterUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassNamePatternFilterUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassUtils.java index c9d5c7cb5050..41c44ddbf54e 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClassUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClasspathScanner.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClasspathScanner.java index 9c943195d90d..c4589503d12a 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClasspathScanner.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ClasspathScanner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CloseablePath.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CloseablePath.java index 3ad49fe7f0e6..e6bb3ddd27df 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CloseablePath.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CloseablePath.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CollectionUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CollectionUtils.java index a3f83b2f6656..dc6bf37a3677 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CollectionUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/CollectionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ExceptionUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ExceptionUtils.java index 5bffb9b903eb..d8177037278b 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ExceptionUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ExceptionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/FunctionUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/FunctionUtils.java index 6720886c39dd..492df5c6b3ff 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/FunctionUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/FunctionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/LruCache.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/LruCache.java index 5245a7b1a13b..dc95539624fa 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/LruCache.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/LruCache.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ModuleUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ModuleUtils.java index e875a3e55644..b230c9213471 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ModuleUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ModuleUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PackageUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PackageUtils.java index 971bdf14ab81..2156b2df739c 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PackageUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PackageUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PreconditionViolationException.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PreconditionViolationException.java index bfb58e40a7bd..67dcdde4cbe7 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PreconditionViolationException.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/PreconditionViolationException.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/Preconditions.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/Preconditions.java index 58ee0a70470e..6e64150c2db0 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/Preconditions.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/Preconditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java index 31dd5cdc8572..c20c93b9c2e4 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ReflectionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/RuntimeUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/RuntimeUtils.java index 020f23226b01..cdbdc1fb2cd2 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/RuntimeUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/RuntimeUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java index c853d73c4349..11155c0c822f 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/StringUtils.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/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/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ToStringBuilder.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ToStringBuilder.java index 130714a2e182..72695f508a73 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ToStringBuilder.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/ToStringBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/UnrecoverableExceptions.java b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/UnrecoverableExceptions.java index 77eac841ad75..dd730e30919f 100644 --- a/junit-platform-commons/src/main/java/org/junit/platform/commons/util/UnrecoverableExceptions.java +++ b/junit-platform-commons/src/main/java/org/junit/platform/commons/util/UnrecoverableExceptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/main/java9/org/junit/platform/commons/util/ModuleUtils.java b/junit-platform-commons/src/main/java9/org/junit/platform/commons/util/ModuleUtils.java index 40255dc28c73..ff2b056653b2 100644 --- a/junit-platform-commons/src/main/java9/org/junit/platform/commons/util/ModuleUtils.java +++ b/junit-platform-commons/src/main/java9/org/junit/platform/commons/util/ModuleUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-commons/src/testFixtures/java/org/junit/platform/commons/test/ConcurrencyTestingUtils.java b/junit-platform-commons/src/testFixtures/java/org/junit/platform/commons/test/ConcurrencyTestingUtils.java index 68a65c1fd03d..70dabdf010a8 100644 --- a/junit-platform-commons/src/testFixtures/java/org/junit/platform/commons/test/ConcurrencyTestingUtils.java +++ b/junit-platform-commons/src/testFixtures/java/org/junit/platform/commons/test/ConcurrencyTestingUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console-standalone/junit-platform-console-standalone.gradle.kts b/junit-platform-console-standalone/junit-platform-console-standalone.gradle.kts index ca8d74cc0420..6a42539e5a98 100644 --- a/junit-platform-console-standalone/junit-platform-console-standalone.gradle.kts +++ b/junit-platform-console-standalone/junit-platform-console-standalone.gradle.kts @@ -1,3 +1,5 @@ +import org.junit.gradle.java.WriteArtifactsFile + plugins { `java-library-conventions` `shadow-conventions` @@ -26,19 +28,9 @@ tasks { attributes("Main-Class" to "org.junit.platform.console.ConsoleLauncher") } } - val shadowedArtifactsFile by registering { - inputs.files(configurations.shadowed).withNormalizer(ClasspathNormalizer::class) - val outputFile = layout.buildDirectory.file("shadowed-artifacts") - outputs.file(outputFile) - doFirst { - outputFile.get().asFile.printWriter().use { out -> - configurations.shadowed.get().resolvedConfiguration.resolvedArtifacts - .map { it.moduleVersion.id } - .map { "${it.group}:${it.name}:${it.version}" } - .sorted() - .forEach(out::println) - } - } + val shadowedArtifactsFile by registering(WriteArtifactsFile::class) { + from(configurations.shadowed) + outputFile.set(layout.buildDirectory.file("shadowed-artifacts")) } shadowJar { // https://github.com/junit-team/junit5/issues/2557 diff --git a/junit-platform-console/junit-platform-console.gradle.kts b/junit-platform-console/junit-platform-console.gradle.kts index 94b664a06135..6006a8c880af 100644 --- a/junit-platform-console/junit-platform-console.gradle.kts +++ b/junit-platform-console/junit-platform-console.gradle.kts @@ -38,19 +38,19 @@ tasks { into("META-INF") } from(sourceSets.mainRelease9.get().output.classesDirs) - doLast { - exec { - executable = project.the().launcherFor(java.toolchain).get() - .metadata.installationPath.file("bin/jar").asFile.absolutePath - args( - "--update", - "--file", archiveFile.get().asFile.absolutePath, - "--main-class", "org.junit.platform.console.ConsoleLauncher", - "--release", "17", - "-C", release17ClassesDir.absolutePath, "." - ) - } - } + doLast(objects.newInstance(org.junit.gradle.java.ExecJarAction::class).apply { + javaLauncher.set(project.javaToolchains.launcherFor(java.toolchain)) + args.addAll( + "--update", + "--file", archiveFile.get().asFile.absolutePath, + "--main-class", "org.junit.platform.console.ConsoleLauncher", + "--release", "17", + "-C", release17ClassesDir.absolutePath, "." + ) + }) + } + codeCoverageClassesJar { + exclude("org/junit/platform/console/options/ConsoleUtils.class") } jar { manifest { diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncher.java b/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncher.java index 672293ad56bd..d697987c9d10 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncher.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncher.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncherExecutionResult.java b/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncherExecutionResult.java index cce1b8293f70..23dd8225471f 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncherExecutionResult.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/ConsoleLauncherExecutionResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/AvailableOptions.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/AvailableOptions.java index 97a33b4bec98..fce8ad509aff 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/AvailableOptions.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/AvailableOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/ClasspathEntriesConverter.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/ClasspathEntriesConverter.java index 754321708dd9..8ea5670c7d39 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/ClasspathEntriesConverter.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/ClasspathEntriesConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptions.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptions.java index e8575e1c232a..4321acbcd598 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptions.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptionsParser.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptionsParser.java index 63ca43c7c120..b460540e4add 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptionsParser.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/CommandLineOptionsParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/ConsoleUtils.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/ConsoleUtils.java index 80d58d813730..da43806a57f8 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/ConsoleUtils.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/ConsoleUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/Details.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/Details.java index f445509c705b..7e6e4bdd850d 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/Details.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/Details.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/PicocliCommandLineOptionsParser.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/PicocliCommandLineOptionsParser.java index f6d488693ea0..a064c1285fdf 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/PicocliCommandLineOptionsParser.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/PicocliCommandLineOptionsParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java index 706b1fc7ea19..65f338daa2eb 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/SelectorConverter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/options/Theme.java b/junit-platform-console/src/main/java/org/junit/platform/console/options/Theme.java index d7fd622aac88..8981def9035e 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/options/Theme.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/options/Theme.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Color.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Color.java index 687eaeb6a743..d330be01b716 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Color.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Color.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ColorPalette.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ColorPalette.java index 069d56410b56..a587980f362a 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ColorPalette.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ColorPalette.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ConsoleTestExecutor.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ConsoleTestExecutor.java index 0db8008d6a0b..a9e540a38c35 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ConsoleTestExecutor.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/ConsoleTestExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutor.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutor.java index 7eff60123106..19794e9bece7 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutor.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java index 76368f3867a9..2fb1ea03a74b 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/FlatPrintingListener.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/FlatPrintingListener.java index e1849cc5001d..bb68bbff4366 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/FlatPrintingListener.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/FlatPrintingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Style.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Style.java index f1c1b64d1969..31f530b85c02 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Style.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/Style.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreeNode.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreeNode.java index dd9cc61fc0dc..40fdbf9345ef 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreeNode.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreeNode.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrinter.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrinter.java index a713aaf4a27b..4f72afff6079 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrinter.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrinter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrintingListener.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrintingListener.java index 936d32545bc3..685ddff5c894 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrintingListener.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/TreePrintingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -17,6 +17,7 @@ import org.junit.platform.console.options.Theme; import org.junit.platform.engine.TestExecutionResult; +import org.junit.platform.engine.UniqueId; import org.junit.platform.engine.reporting.ReportEntry; import org.junit.platform.launcher.TestExecutionListener; import org.junit.platform.launcher.TestIdentifier; @@ -27,7 +28,7 @@ */ class TreePrintingListener implements TestExecutionListener { - private final Map nodesByUniqueId = new ConcurrentHashMap<>(); + private final Map nodesByUniqueId = new ConcurrentHashMap<>(); private TreeNode root; private final TreePrinter treePrinter; @@ -35,15 +36,14 @@ class TreePrintingListener implements TestExecutionListener { this.treePrinter = new TreePrinter(out, theme, colorPalette); } - private TreeNode addNode(TestIdentifier testIdentifier, Supplier nodeSupplier) { + private void addNode(TestIdentifier testIdentifier, Supplier nodeSupplier) { TreeNode node = nodeSupplier.get(); - nodesByUniqueId.put(testIdentifier.getUniqueId(), node); - testIdentifier.getParentId().map(nodesByUniqueId::get).orElse(root).addChild(node); - return node; + nodesByUniqueId.put(testIdentifier.getUniqueIdObject(), node); + testIdentifier.getParentIdObject().map(nodesByUniqueId::get).orElse(root).addChild(node); } private TreeNode getNode(TestIdentifier testIdentifier) { - return nodesByUniqueId.get(testIdentifier.getUniqueId()); + return nodesByUniqueId.get(testIdentifier.getUniqueIdObject()); } @Override diff --git a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/VerboseTreePrintingListener.java b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/VerboseTreePrintingListener.java index a411528de916..9031a383f64f 100644 --- a/junit-platform-console/src/main/java/org/junit/platform/console/tasks/VerboseTreePrintingListener.java +++ b/junit-platform-console/src/main/java/org/junit/platform/console/tasks/VerboseTreePrintingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java17/org/junit/platform/console/options/ConsoleUtils.java b/junit-platform-console/src/main/java17/org/junit/platform/console/options/ConsoleUtils.java index 8daae7d7ed68..89698f1019f6 100644 --- a/junit-platform-console/src/main/java17/org/junit/platform/console/options/ConsoleUtils.java +++ b/junit-platform-console/src/main/java17/org/junit/platform/console/options/ConsoleUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-console/src/main/java9/org/junit/platform/console/ConsoleLauncherToolProvider.java b/junit-platform-console/src/main/java9/org/junit/platform/console/ConsoleLauncherToolProvider.java index 98486c7873d5..d0a830a4f939 100644 --- a/junit-platform-console/src/main/java9/org/junit/platform/console/ConsoleLauncherToolProvider.java +++ b/junit-platform-console/src/main/java9/org/junit/platform/console/ConsoleLauncherToolProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/CompositeFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/CompositeFilter.java index ecc941371d70..41522e850bf8 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/CompositeFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/CompositeFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/ConfigurationParameters.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/ConfigurationParameters.java index c7fd8852c920..7c859ab31c62 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/ConfigurationParameters.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/ConfigurationParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoveryFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoveryFilter.java index b9038b876fb4..68b5b1d588a0 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoveryFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoveryFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java index e7e88fd08a29..06c222ac6c1c 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/DiscoverySelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryListener.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryListener.java index abab7c04d299..615ce857d5d6 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryListener.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryRequest.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryRequest.java index df34b36d6529..e5062594c29c 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryRequest.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineDiscoveryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineExecutionListener.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineExecutionListener.java index 1a0838a19a9f..315548ff3b98 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineExecutionListener.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/EngineExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/ExecutionRequest.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/ExecutionRequest.java index 385e40714a41..2c77f1fd5d66 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/ExecutionRequest.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/ExecutionRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/Filter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/Filter.java index ee4ace269305..2d77ff1efd2b 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/Filter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/Filter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/FilterResult.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/FilterResult.java index 9c5d2d79e94c..622205aa3bf9 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/FilterResult.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/FilterResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/SelectorResolutionResult.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/SelectorResolutionResult.java index 52656ace8061..2229101742aa 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/SelectorResolutionResult.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/SelectorResolutionResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestDescriptor.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestDescriptor.java index a2cffcf5592b..b16a8d4319e2 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestDescriptor.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestEngine.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestEngine.java index c8201707eeb4..401fa19363c8 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestEngine.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestEngine.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestExecutionResult.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestExecutionResult.java index 1006f81062f7..6509ecd47b41 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestExecutionResult.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestExecutionResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestSource.java index b6b175726e7b..0f3d873869a0 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestTag.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestTag.java index b5e1166d86d3..9a32e07f9261 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/TestTag.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/TestTag.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueId.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueId.java index f239ef5c038c..f4d516cf79d3 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueId.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueId.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueIdFormat.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueIdFormat.java index cf931f79af22..f89dddd98a84 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueIdFormat.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/UniqueIdFormat.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/AbstractClassNameFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/AbstractClassNameFilter.java index d3b23410cd88..d8512db329f7 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/AbstractClassNameFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/AbstractClassNameFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassNameFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassNameFilter.java index d5942fd2999e..ae4049899b9c 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassNameFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassNameFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java index b33f981f89ea..30f6906994d7 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClassSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java index c4f714478ec6..b257e6c26ce0 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathResourceSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java index 0e5a2740283e..b9d03f484737 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ClasspathRootSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java index 9885c3584161..167da07b1237 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DirectorySelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java index 729dca58e6f7..77336370a366 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/DiscoverySelectors.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludeClassNameFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludeClassNameFilter.java index 03fd04b9df96..8a3aa725af21 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludeClassNameFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludeClassNameFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludePackageNameFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludePackageNameFilter.java index dab9dde7b273..37fb11ca864d 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludePackageNameFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ExcludePackageNameFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FilePosition.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FilePosition.java index f5b3969fed2a..4245187ae651 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FilePosition.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FilePosition.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java index 6f9ed604d81d..78bf501c6d8d 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/FileSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludeClassNameFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludeClassNameFilter.java index 55a286caf5df..5cd49e1413e0 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludeClassNameFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludeClassNameFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludePackageNameFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludePackageNameFilter.java index 3666df39a37e..2ceb30f4a142 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludePackageNameFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IncludePackageNameFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java index 58e53de73aca..fe9ff20acfdf 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/IterationSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java index d8010f0ad6b5..ff7e627ac4d7 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/MethodSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java index 3288b5c7638c..68825eb0d84b 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/ModuleSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java index 1fd221f54f80..5d463eabe438 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedClassSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java index a879cf09d68e..28f00afa88c1 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/NestedMethodSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageNameFilter.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageNameFilter.java index e77fbe828393..55a808efa828 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageNameFilter.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageNameFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java index f1ac80b7ad6e..781fc2af0906 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/PackageSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java index c328d8cf6d43..4fee909e7746 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UniqueIdSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java index 23d181bba6fd..c673851d11e0 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/discovery/UriSelector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/reporting/ReportEntry.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/reporting/ReportEntry.java index e98086b5cf1b..6e114191d110 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/reporting/ReportEntry.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/reporting/ReportEntry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/config/PrefixedConfigurationParameters.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/config/PrefixedConfigurationParameters.java index 071c591410f3..f50e9a32a48f 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/config/PrefixedConfigurationParameters.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/config/PrefixedConfigurationParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptor.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptor.java index ff5de7e844c3..dd0a53e8378a 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptor.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClassSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClassSource.java index 66cabecb6daf..89f33addb0fd 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClassSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClassSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSource.java index 39201a188813..0a288d3257b4 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/CompositeTestSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/CompositeTestSource.java index b3bd968951d7..3fa3ccc9e6f3 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/CompositeTestSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/CompositeTestSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DefaultUriSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DefaultUriSource.java index d0c56ca14582..dd7a602a3d49 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DefaultUriSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DefaultUriSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DirectorySource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DirectorySource.java index 5d7f808749a5..c64c2dba18a3 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DirectorySource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/DirectorySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/EngineDescriptor.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/EngineDescriptor.java index 058c7c8e56ce..fbf57519c458 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/EngineDescriptor.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/EngineDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FilePosition.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FilePosition.java index 4635d12387ea..a0fb2c943453 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FilePosition.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FilePosition.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSource.java index cfa3c114ba9a..7e4ab6c9d989 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSystemSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSystemSource.java index 335ff3225b1f..2a4c976d04bc 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSystemSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/FileSystemSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/MethodSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/MethodSource.java index 5492bbd90f3a..977bd4f8fbf8 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/MethodSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/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 diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/PackageSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/PackageSource.java index f714ed70085c..b19dc3b3d9a3 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/PackageSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/PackageSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ResourceUtils.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ResourceUtils.java index 15b014848a15..ae9cfdd2f35d 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ResourceUtils.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/ResourceUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/UriSource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/UriSource.java index 689de827e870..fb6829e5c232 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/UriSource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/descriptor/UriSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/ClassContainerSelectorResolver.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/ClassContainerSelectorResolver.java index 927d157955a5..886743da69ae 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/ClassContainerSelectorResolver.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/ClassContainerSelectorResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolution.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolution.java index 8b2a5b3de5e2..81c618f965c4 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolution.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolution.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolver.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolver.java index c88df82865e7..344f917ca9e6 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolver.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/SelectorResolver.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/SelectorResolver.java index e32fca8c9541..93bc2b1d647f 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/SelectorResolver.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/discovery/SelectorResolver.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/filter/ClasspathScanningSupport.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/filter/ClasspathScanningSupport.java index b3b5f39839a8..9169ea77ead6 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/filter/ClasspathScanningSupport.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/filter/ClasspathScanningSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/CompositeLock.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/CompositeLock.java index 53b5b4b929e6..41b08d5fa3ae 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/CompositeLock.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/CompositeLock.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfiguration.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfiguration.java index 961f7d727f64..f00735a7b69d 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfiguration.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,6 +10,9 @@ package org.junit.platform.engine.support.hierarchical; +import java.util.concurrent.ForkJoinPool; +import java.util.function.Predicate; + /** * @since 1.3 */ @@ -20,14 +23,16 @@ class DefaultParallelExecutionConfiguration implements ParallelExecutionConfigur private final int maxPoolSize; private final int corePoolSize; private final int keepAliveSeconds; + private final Predicate saturate; DefaultParallelExecutionConfiguration(int parallelism, int minimumRunnable, int maxPoolSize, int corePoolSize, - int keepAliveSeconds) { + int keepAliveSeconds, Predicate saturate) { this.parallelism = parallelism; this.minimumRunnable = minimumRunnable; this.maxPoolSize = maxPoolSize; this.corePoolSize = corePoolSize; this.keepAliveSeconds = keepAliveSeconds; + this.saturate = saturate; } @Override @@ -55,4 +60,8 @@ public int getKeepAliveSeconds() { return keepAliveSeconds; } + @Override + public Predicate getSaturatePredicate() { + return saturate; + } } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategy.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategy.java index 5160e6c796ee..52f03cb6dee2 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategy.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -42,8 +42,14 @@ public ParallelExecutionConfiguration createConfiguration(ConfigurationParameter () -> new JUnitException(String.format("Configuration parameter '%s' must be set", CONFIG_FIXED_PARALLELISM_PROPERTY_NAME))); - return new DefaultParallelExecutionConfiguration(parallelism, parallelism, 256 + parallelism, parallelism, - KEEP_ALIVE_SECONDS); + int maxPoolSize = configurationParameters.get(CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME, + Integer::valueOf).orElse(parallelism + 256); + + boolean saturate = configurationParameters.get(CONFIG_FIXED_SATURATE_PROPERTY_NAME, + Boolean::valueOf).orElse(true); + + return new DefaultParallelExecutionConfiguration(parallelism, parallelism, maxPoolSize, parallelism, + KEEP_ALIVE_SECONDS, __ -> saturate); } }, @@ -66,7 +72,7 @@ public ParallelExecutionConfiguration createConfiguration(ConfigurationParameter factor.multiply(BigDecimal.valueOf(Runtime.getRuntime().availableProcessors())).intValue()); return new DefaultParallelExecutionConfiguration(parallelism, parallelism, 256 + parallelism, parallelism, - KEEP_ALIVE_SECONDS); + KEEP_ALIVE_SECONDS, null); } }, @@ -114,6 +120,36 @@ public ParallelExecutionConfiguration createConfiguration(ConfigurationParameter */ public static final String CONFIG_FIXED_PARALLELISM_PROPERTY_NAME = "fixed.parallelism"; + /** + * Property name used to configure the maximum pool size of the underlying + * fork-join pool for the {@link #FIXED} configuration strategy. + * + *

Value must be an integer and greater than or equal to + * {@value #CONFIG_FIXED_PARALLELISM_PROPERTY_NAME}; defaults to + * {@code 256 + fixed.parallelism}. + * + * @since 1.10 + * @see #FIXED + */ + @API(status = EXPERIMENTAL, since = "1.10") + public static final String CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME = "fixed.max-pool-size"; + + /** + * Property name used to disable saturation of the underlying fork-join pool + * for the {@link #FIXED} configuration strategy. + * + *

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}. + * + * @since 1.10 + * @see #FIXED + * @see #CONFIG_FIXED_MAX_POOL_SIZE_PROPERTY_NAME + */ + @API(status = EXPERIMENTAL, since = "1.10") + public static final String CONFIG_FIXED_SATURATE_PROPERTY_NAME = "fixed.saturate"; + /** * Property name of the factor used to determine the desired parallelism for the * {@link #DYNAMIC} configuration strategy. diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/EngineExecutionContext.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/EngineExecutionContext.java index 2dbb21a9871a..4a3748d96e53 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/EngineExecutionContext.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/EngineExecutionContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ExclusiveResource.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ExclusiveResource.java index 64412dc6b7a5..1674101c4c4c 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ExclusiveResource.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ExclusiveResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorService.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorService.java index f32c443e2ca9..84ef2561ea27 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorService.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorService.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -19,6 +19,8 @@ import java.util.Deque; import java.util.LinkedList; import java.util.List; +import java.util.Optional; +import java.util.concurrent.Callable; import java.util.concurrent.ForkJoinPool; import java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory; import java.util.concurrent.ForkJoinTask; @@ -26,6 +28,7 @@ import java.util.concurrent.Future; import java.util.concurrent.RecursiveAction; import java.util.concurrent.TimeUnit; +import java.util.function.Function; import java.util.function.Predicate; import org.apiguardian.api.API; @@ -81,18 +84,32 @@ private static ParallelExecutionConfiguration createConfiguration(ConfigurationP private ForkJoinPool createForkJoinPool(ParallelExecutionConfiguration configuration) { ForkJoinWorkerThreadFactory threadFactory = new WorkerThreadFactory(); - return Try.call(() -> { - // Try to use constructor available in Java >= 9 - Constructor constructor = ForkJoinPool.class.getDeclaredConstructor(Integer.TYPE, - ForkJoinWorkerThreadFactory.class, UncaughtExceptionHandler.class, Boolean.TYPE, Integer.TYPE, - Integer.TYPE, Integer.TYPE, Predicate.class, Long.TYPE, TimeUnit.class); - return constructor.newInstance(configuration.getParallelism(), threadFactory, null, false, - configuration.getCorePoolSize(), configuration.getMaxPoolSize(), configuration.getMinimumRunnable(), - configuration.getSaturatePredicate(), configuration.getKeepAliveSeconds(), TimeUnit.SECONDS); - }).orElseTry(() -> { - // Fallback for Java 8 - return new ForkJoinPool(configuration.getParallelism(), threadFactory, null, false); - }).getOrThrow(cause -> new JUnitException("Failed to create ForkJoinPool", cause)); + // Try to use constructor available in Java >= 9 + Callable constructorInvocation = sinceJava9Constructor() // + .map(sinceJava9ConstructorInvocation(configuration, threadFactory)) + // Fallback for Java 8 + .orElse(sinceJava7ConstructorInvocation(configuration, threadFactory)); + return Try.call(constructorInvocation) // + .getOrThrow(cause -> new JUnitException("Failed to create ForkJoinPool", cause)); + } + + private static Optional> sinceJava9Constructor() { + return Try.call(() -> ForkJoinPool.class.getDeclaredConstructor(Integer.TYPE, ForkJoinWorkerThreadFactory.class, + UncaughtExceptionHandler.class, Boolean.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE, Predicate.class, + Long.TYPE, TimeUnit.class)) // + .toOptional(); + } + + private static Function, Callable> sinceJava9ConstructorInvocation( + ParallelExecutionConfiguration configuration, ForkJoinWorkerThreadFactory threadFactory) { + return constructor -> () -> constructor.newInstance(configuration.getParallelism(), threadFactory, null, false, + configuration.getCorePoolSize(), configuration.getMaxPoolSize(), configuration.getMinimumRunnable(), + configuration.getSaturatePredicate(), configuration.getKeepAliveSeconds(), TimeUnit.SECONDS); + } + + private static Callable sinceJava7ConstructorInvocation(ParallelExecutionConfiguration configuration, + ForkJoinWorkerThreadFactory threadFactory) { + return () -> new ForkJoinPool(configuration.getParallelism(), threadFactory, null, false); } @Override @@ -199,6 +216,7 @@ static class WorkerThreadFactory implements ForkJoinPool.ForkJoinWorkerThreadFac public ForkJoinWorkerThread newThread(ForkJoinPool pool) { return new WorkerThread(pool, contextClassLoader); } + } static class WorkerThread extends ForkJoinWorkerThread { @@ -207,6 +225,7 @@ static class WorkerThread extends ForkJoinWorkerThread { super(pool); setContextClassLoader(contextClassLoader); } + } } diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestEngine.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestEngine.java index fb60a2308e4f..44ff65f3a581 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestEngine.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestEngine.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutor.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutor.java index 5b781b663df3..e1535dc116e7 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutor.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorService.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorService.java index f8767e118c82..b4290a77d0e3 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorService.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorService.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/LockManager.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/LockManager.java index b9d8778ca195..1b5b37b024ea 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/LockManager.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/LockManager.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/Node.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/Node.java index f5468f11bb96..691d5140a68e 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/Node.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/Node.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java index 5918c7b96d51..0a86036135f3 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeExecutionAdvisor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTask.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTask.java index 1fa542d8f0d4..34df1e0c0acc 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTask.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTask.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTaskContext.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTaskContext.java index c3b6e93f9a44..35a34af81313 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTaskContext.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTestTaskContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java index 00521be8ee4b..2bb59d5099f9 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalker.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeUtils.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeUtils.java index f0212d11f7b9..b76ba240ddb5 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeUtils.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NodeUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NopLock.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NopLock.java index fea1c84987b6..df6f64fc3707 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NopLock.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/NopLock.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/OpenTest4JAwareThrowableCollector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/OpenTest4JAwareThrowableCollector.java index 4526824e688f..53b9e2168d70 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/OpenTest4JAwareThrowableCollector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/OpenTest4JAwareThrowableCollector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java index aa39d56e6b0b..4707889644ec 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfigurationStrategy.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfigurationStrategy.java index a68551aa5f82..181ae46332a6 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfigurationStrategy.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionConfigurationStrategy.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ResourceLock.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ResourceLock.java index c471858dab33..9ec55b8f7fca 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ResourceLock.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/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-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SameThreadHierarchicalTestExecutorService.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SameThreadHierarchicalTestExecutorService.java index 841d3c75f020..c1844da90ace 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SameThreadHierarchicalTestExecutorService.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SameThreadHierarchicalTestExecutorService.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleLock.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleLock.java index 5c8666b586a2..5d104e8d9284 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleLock.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleLock.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutor.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutor.java index c252fbe3b05d..6c87fb116517 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutor.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ThrowableCollector.java b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ThrowableCollector.java index d934be5284b4..5a1e9d56d470 100644 --- a/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ThrowableCollector.java +++ b/junit-platform-engine/src/main/java/org/junit/platform/engine/support/hierarchical/ThrowableCollector.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoEngineExecutionContext.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoEngineExecutionContext.java index e7e96f29b9f9..8d3c74a71b8b 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoEngineExecutionContext.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoEngineExecutionContext.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalContainerDescriptor.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalContainerDescriptor.java index b11ec5481d56..09c0b622c601 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalContainerDescriptor.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalContainerDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalEngineDescriptor.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalEngineDescriptor.java index 2d499a9706e5..1d14b7710182 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalEngineDescriptor.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalEngineDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestDescriptor.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestDescriptor.java index 60c31b622c40..130aba4ad691 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestDescriptor.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestEngine.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestEngine.java index 1f58a1edb609..97f23ce1ed8d 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestEngine.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/engine/support/hierarchical/DemoHierarchicalTestEngine.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestDescriptorStub.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestDescriptorStub.java index a179e00962dd..49907eece1e0 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestDescriptorStub.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestDescriptorStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineSpy.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineSpy.java index 4e5607828d5c..2cb30350c351 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineSpy.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineSpy.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineStub.java b/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineStub.java index f4140988aca6..3ef7186545df 100644 --- a/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineStub.java +++ b/junit-platform-engine/src/testFixtures/java/org/junit/platform/fakes/TestEngineStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-jfr/junit-platform-jfr.gradle.kts b/junit-platform-jfr/junit-platform-jfr.gradle.kts index 4bf6d89688d8..00198d86a540 100644 --- a/junit-platform-jfr/junit-platform-jfr.gradle.kts +++ b/junit-platform-jfr/junit-platform-jfr.gradle.kts @@ -21,7 +21,7 @@ javaLibrary { tasks { compileJava { - javaCompiler.set(project.the().compilerFor { + javaCompiler.set(project.javaToolchains.compilerFor { languageVersion.set(JavaLanguageVersion.of(8)) }) } diff --git a/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingDiscoveryListener.java b/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingDiscoveryListener.java index 1db552486b12..d506a562f320 100644 --- a/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingDiscoveryListener.java +++ b/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingExecutionListener.java b/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingExecutionListener.java index 6df356e6925c..be66660299cc 100644 --- a/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingExecutionListener.java +++ b/junit-platform-jfr/src/main/java/org/junit/platform/jfr/FlightRecordingExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -42,7 +42,7 @@ public class FlightRecordingExecutionListener implements TestExecutionListener { private final AtomicReference testPlanExecutionEvent = new AtomicReference<>(); - private final Map testExecutionEvents = new ConcurrentHashMap<>(); + private final Map testExecutionEvents = new ConcurrentHashMap<>(); @Override public void testPlanExecutionStarted(TestPlan plan) { @@ -70,7 +70,7 @@ public void executionSkipped(TestIdentifier test, String reason) { @Override public void executionStarted(TestIdentifier test) { TestExecutionEvent event = new TestExecutionEvent(); - testExecutionEvents.put(test.getUniqueId(), event); + testExecutionEvents.put(test.getUniqueIdObject(), event); event.initialize(test); event.begin(); } @@ -78,7 +78,7 @@ public void executionStarted(TestIdentifier test) { @Override public void executionFinished(TestIdentifier test, TestExecutionResult result) { Optional throwable = result.getThrowable(); - TestExecutionEvent event = testExecutionEvents.remove(test.getUniqueId()); + TestExecutionEvent event = testExecutionEvents.remove(test.getUniqueIdObject()); event.end(); event.result = result.getStatus().toString(); event.exceptionClass = throwable.map(Throwable::getClass).orElse(null); diff --git a/junit-platform-jfr/src/main/java/org/junit/platform/jfr/UniqueId.java b/junit-platform-jfr/src/main/java/org/junit/platform/jfr/UniqueId.java index dd783ad6d4e2..653226e69ede 100644 --- a/junit-platform-jfr/src/main/java/org/junit/platform/jfr/UniqueId.java +++ b/junit-platform-jfr/src/main/java/org/junit/platform/jfr/UniqueId.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineDiscoveryResult.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineDiscoveryResult.java index fe937d846a16..39c703720dad 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineDiscoveryResult.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineDiscoveryResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineFilter.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineFilter.java index e0519879e188..6013abb28732 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineFilter.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/EngineFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/Launcher.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/Launcher.java index 5ad899165d37..2c3a96df09fd 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/Launcher.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/Launcher.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherConstants.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherConstants.java index 33c1923b1f77..b4f5916f00c1 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherConstants.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherConstants.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryListener.java index b0337bf8cd25..90062041a169 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryRequest.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryRequest.java index a76abb63b6c0..1a91c9cc4a9e 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryRequest.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherDiscoveryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSession.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSession.java index da968fc9f08d..b8e71c8d0426 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSession.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSessionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSessionListener.java index ebdd60288b0b..96af16434669 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSessionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/LauncherSessionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/PostDiscoveryFilter.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/PostDiscoveryFilter.java index 45328f2fdd75..7c31d55c5a00 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/PostDiscoveryFilter.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/PostDiscoveryFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TagFilter.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TagFilter.java index ab69315eaa05..7389aa53584d 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TagFilter.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TagFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java index f64f47382d1b..fed40da48355 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -46,6 +46,12 @@ * {@link #testPlanExecutionStarted(TestPlan)} and * {@link #testPlanExecutionFinished(TestPlan)}. * + *

Note on concurrency: {@link #testPlanExecutionStarted(TestPlan)} and + * {@link #testPlanExecutionFinished(TestPlan)} are always called from the same + * thread. It is safe to assume that there is at most one {@code TestPlan} + * instance at a time. All other methods could be called from different threads + * concurrently in case one or multiple test engines execute tests in parallel. + * * @since 1.0 * @see Launcher * @see TestPlan @@ -58,6 +64,8 @@ public interface TestExecutionListener { * Called when the execution of the {@link TestPlan} has started, * before any test has been executed. * + *

Called from the same thread as {@link #testPlanExecutionFinished(TestPlan)}. + * * @param testPlan describes the tree of tests about to be executed */ default void testPlanExecutionStarted(TestPlan testPlan) { @@ -67,6 +75,8 @@ default void testPlanExecutionStarted(TestPlan testPlan) { * Called when the execution of the {@link TestPlan} has finished, * after all tests have been executed. * + *

Called from the same thread as {@link #testPlanExecutionStarted(TestPlan)}. + * * @param testPlan describes the tree of tests that have been executed */ default void testPlanExecutionFinished(TestPlan testPlan) { diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java index beaf8128dc56..20eaf35624d1 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestIdentifier.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestPlan.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestPlan.java index 8184d8c5ab25..0557b8650a4a 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestPlan.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/TestPlan.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -158,7 +158,7 @@ public Set getRoots() { */ public Optional getParent(TestIdentifier child) { Preconditions.notNull(child, "child must not be null"); - return child.getParentId().map(this::getTestIdentifier); + return child.getParentIdObject().map(this::getTestIdentifier); } /** @@ -166,11 +166,11 @@ public Optional getParent(TestIdentifier child) { * * @param parent the identifier to look up the children for; never {@code null} * @return an unmodifiable set of the parent's children, potentially empty - * @see #getChildren(String) + * @see #getChildren(UniqueId) */ public Set getChildren(TestIdentifier parent) { Preconditions.notNull(parent, "parent must not be null"); - return getChildren(parent.getUniqueId()); + return getChildren(parent.getUniqueIdObject()); } /** @@ -180,11 +180,26 @@ public Set getChildren(TestIdentifier parent) { * {@code null} or blank * @return an unmodifiable set of the parent's children, potentially empty * @see #getChildren(TestIdentifier) + * @deprecated Use {@link #getChildren(UniqueId)} */ + @API(status = DEPRECATED, since = "1.10") + @Deprecated public Set getChildren(String parentId) { Preconditions.notBlank(parentId, "parent ID must not be null or blank"); - UniqueId uniqueId = UniqueId.parse(parentId); - return children.containsKey(uniqueId) ? unmodifiableSet(children.get(uniqueId)) : emptySet(); + return getChildren(UniqueId.parse(parentId)); + } + + /** + * Get the children of the supplied unique ID. + * + * @param parentId the unique ID to look up the children for; never + * {@code null} + * @return an unmodifiable set of the parent's children, potentially empty + * @see #getChildren(TestIdentifier) + */ + @API(status = MAINTAINED, since = "1.10") + public Set getChildren(UniqueId parentId) { + return children.containsKey(parentId) ? unmodifiableSet(children.get(parentId)) : emptySet(); } /** @@ -195,13 +210,29 @@ public Set getChildren(String parentId) { * @return the identifier with the supplied unique ID; never {@code null} * @throws PreconditionViolationException if no {@code TestIdentifier} * with the supplied unique ID is present in this test plan + * @deprecated Use {@link #getTestIdentifier(UniqueId)} */ + @API(status = DEPRECATED, since = "1.10") + @Deprecated public TestIdentifier getTestIdentifier(String uniqueId) throws PreconditionViolationException { Preconditions.notBlank(uniqueId, "unique ID must not be null or blank"); - UniqueId uniqueIdObject = UniqueId.parse(uniqueId); - Preconditions.condition(allIdentifiers.containsKey(uniqueIdObject), + return getTestIdentifier(UniqueId.parse(uniqueId)); + } + + /** + * Get the {@link TestIdentifier} with the supplied unique ID. + * + * @param uniqueId the unique ID to look up the identifier for; never + * {@code null} + * @return the identifier with the supplied unique ID; never {@code null} + * @throws PreconditionViolationException if no {@code TestIdentifier} + * with the supplied unique ID is present in this test plan + */ + @API(status = MAINTAINED, since = "1.10") + public TestIdentifier getTestIdentifier(UniqueId uniqueId) { + Preconditions.notNull(uniqueId, () -> "uniqueId must not be null"); + return Preconditions.notNull(allIdentifiers.get(uniqueId), () -> "No TestIdentifier with unique ID [" + uniqueId + "] has been added to this TestPlan."); - return allIdentifiers.get(uniqueIdObject); } /** diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeEngineExecutionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeEngineExecutionListener.java index c99a44f57cbd..fc3cf56183e8 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeEngineExecutionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeEngineExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeTestExecutionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeTestExecutionListener.java index 399745ac6362..a8c5d7ade41a 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeTestExecutionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/CompositeTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultDiscoveryRequest.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultDiscoveryRequest.java index 53f27acb05f7..422f9592374e 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultDiscoveryRequest.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultDiscoveryRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncher.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncher.java index 258513847e39..3b0dc3e03f91 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncher.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncher.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherConfig.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherConfig.java index fd90412a2984..500cdde224ff 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherConfig.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherSession.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherSession.java index e443c48b19dc..79f6d815fc76 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherSession.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DefaultLauncherSession.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DelegatingEngineExecutionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DelegatingEngineExecutionListener.java index 14fac9ecfc9c..e2f410533602 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DelegatingEngineExecutionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/DelegatingEngineExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryErrorDescriptor.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryErrorDescriptor.java index 75beb3922aa3..50a4df10b05c 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryErrorDescriptor.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryErrorDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryOrchestrator.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryOrchestrator.java index 94dcc7813395..4bb7f3193149 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryOrchestrator.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryOrchestrator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidator.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidator.java index a917588358db..a5441ae65462 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidator.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineExecutionOrchestrator.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineExecutionOrchestrator.java index 982d62a91371..35e174e46ecd 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineExecutionOrchestrator.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineExecutionOrchestrator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineFilterer.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineFilterer.java index 98d2e6afc6ac..04f0d24fcabe 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineFilterer.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineFilterer.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineIdValidator.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineIdValidator.java index e7c434ae261f..adf3739b39e0 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineIdValidator.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/EngineIdValidator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ExecutionListenerAdapter.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ExecutionListenerAdapter.java index f739dfcfe0ee..f2d87e4bfea8 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ExecutionListenerAdapter.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ExecutionListenerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -62,7 +62,7 @@ public void reportingEntryPublished(TestDescriptor testDescriptor, ReportEntry e } private TestIdentifier getTestIdentifier(TestDescriptor testDescriptor) { - return this.testPlan.getTestIdentifier(testDescriptor.getUniqueId().toString()); + return this.testPlan.getTestIdentifier(testDescriptor.getUniqueId()); } } diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalLauncher.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalLauncher.java index 3b2e0001bd4a..453be6931729 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalLauncher.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalLauncher.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalTestPlan.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalTestPlan.java index 836669b8cb23..20a1557195fe 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalTestPlan.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/InternalTestPlan.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -16,6 +16,7 @@ import java.util.function.Predicate; import org.junit.platform.commons.PreconditionViolationException; +import org.junit.platform.engine.UniqueId; import org.junit.platform.launcher.TestIdentifier; import org.junit.platform.launcher.TestPlan; @@ -80,16 +81,28 @@ public Set getChildren(TestIdentifier parent) { return delegate.getChildren(parent); } + @SuppressWarnings("deprecation") @Override public Set getChildren(String parentId) { return delegate.getChildren(parentId); } + @Override + public Set getChildren(UniqueId parentId) { + return delegate.getChildren(parentId); + } + + @SuppressWarnings("deprecation") @Override public TestIdentifier getTestIdentifier(String uniqueId) throws PreconditionViolationException { return delegate.getTestIdentifier(uniqueId); } + @Override + public TestIdentifier getTestIdentifier(UniqueId uniqueId) { + return delegate.getTestIdentifier(uniqueId); + } + @Override public long countTestIdentifiers(Predicate predicate) { return delegate.countTestIdentifiers(predicate); diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfig.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfig.java index efc23d181baa..0a622b168f6b 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfig.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfigurationParameters.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfigurationParameters.java index 2f220916d3f6..5d6b95edd9ee 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfigurationParameters.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherConfigurationParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder.java index 42e23f00ab6f..24be659b290a 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryResult.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryResult.java index 94122c8f9ca6..9e6d3e7a3bdc 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryResult.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherDiscoveryResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherFactory.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherFactory.java index 309cc883c5ed..3ac0b4c8330d 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherFactory.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/LauncherFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ListenerRegistry.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ListenerRegistry.java index bcc30d678176..1fab26cd1cdf 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ListenerRegistry.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ListenerRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/OutcomeDelayingEngineExecutionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/OutcomeDelayingEngineExecutionListener.java index e4754b87dd56..9b55df04d521 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/OutcomeDelayingEngineExecutionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/OutcomeDelayingEngineExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderRegistry.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderRegistry.java index 936d79c0ec74..47ccd2f23095 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderRegistry.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderTestEngineRegistry.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderTestEngineRegistry.java index 0d691e4b07a6..00233a6b44db 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderTestEngineRegistry.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/ServiceLoaderTestEngineRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/SessionPerRequestLauncher.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/SessionPerRequestLauncher.java index 76b8671079b1..9c0b7dd47e60 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/SessionPerRequestLauncher.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/SessionPerRequestLauncher.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListener.java index ddcfaff3158d..be0e6a41e1ae 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptor.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptor.java index 66209be947d6..aa72890f359f 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptor.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/StreamInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -93,7 +93,7 @@ public void write(byte[] buf, int off, int len) { super.write(buf, off, len); } - class RewindableByteArrayOutputStream extends ByteArrayOutputStream { + static class RewindableByteArrayOutputStream extends ByteArrayOutputStream { private final Deque markedPositions = new ArrayDeque<>(); diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/TestEngineFormatter.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/TestEngineFormatter.java index bc5e2ca9723f..0c5beba2b06e 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/TestEngineFormatter.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/core/TestEngineFormatter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LegacyReportingUtils.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LegacyReportingUtils.java index a751ae3d117c..4ab5097a9d33 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LegacyReportingUtils.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LegacyReportingUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LoggingListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LoggingListener.java index 2325df03b3b4..949d36572f22 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LoggingListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/LoggingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/MutableTestExecutionSummary.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/MutableTestExecutionSummary.java index 1e95f1ae754e..96f341443ce4 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/MutableTestExecutionSummary.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/MutableTestExecutionSummary.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/OutputDir.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/OutputDir.java index a76785ee4667..14080b1f7e27 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/OutputDir.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/OutputDir.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/SummaryGeneratingListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/SummaryGeneratingListener.java index e32db1ceb02b..a161fc503162 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/SummaryGeneratingListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/SummaryGeneratingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/TestExecutionSummary.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/TestExecutionSummary.java index 9c9be35bb398..3a996d0163c7 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/TestExecutionSummary.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/TestExecutionSummary.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListener.java index f644ec3711d0..379dccdb6f73 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListener.java index 94f96b2c9a3e..b41816c4cc03 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/CompositeLauncherDiscoveryListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/CompositeLauncherDiscoveryListener.java index 277126cac864..1484696628da 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/CompositeLauncherDiscoveryListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/CompositeLauncherDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LauncherDiscoveryListeners.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LauncherDiscoveryListeners.java index 71a32a808947..c64f28fc20a2 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LauncherDiscoveryListeners.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LauncherDiscoveryListeners.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListener.java index 770903f0211e..b3a674d51802 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/CompositeLauncherSessionListener.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/CompositeLauncherSessionListener.java index 4039fec43d3d..a79f93f8cfee 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/CompositeLauncherSessionListener.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/CompositeLauncherSessionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/LauncherSessionListeners.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/LauncherSessionListeners.java index 2e7b901c18f5..f200e01adc54 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/LauncherSessionListeners.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/listeners/session/LauncherSessionListeners.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/DequeStack.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/DequeStack.java index b2cf0a2ccc3c..c49df5f640b3 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/DequeStack.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/DequeStack.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operator.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operator.java index 2b22142e0580..936b53c57203 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operator.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operators.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operators.java index 4793a6ed4d99..a8685088cb10 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operators.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Operators.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResult.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResult.java index fc766a8b5011..1c0a13469bac 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResult.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResults.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResults.java index 49e25ce6005f..ceb19b32b8d1 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResults.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseResults.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseStatus.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseStatus.java index 1f3036e6144a..52f8fd154368 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseStatus.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ParseStatus.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Parser.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Parser.java index a783fa55b1bd..c3b3000a4c93 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Parser.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Parser.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ShuntingYard.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ShuntingYard.java index 3be8a21cc47b..063574ff6bd7 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ShuntingYard.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/ShuntingYard.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Stack.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Stack.java index 2433acce5fa7..ab7d8b738fd2 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Stack.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Stack.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpression.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpression.java index 5d9c1c29f1a4..823191bcf9ab 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpression.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpression.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpressions.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpressions.java index d551581fded5..a9f8e04aef9f 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpressions.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TagExpressions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Token.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Token.java index e7190e0823cc..f06a60ca97de 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Token.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Token.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TokenWith.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TokenWith.java index 0f0d20ad8fdd..a580df8769f2 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TokenWith.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/TokenWith.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Tokenizer.java b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Tokenizer.java index a0f618ca217c..65d13c11811b 100644 --- a/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Tokenizer.java +++ b/junit-platform-launcher/src/main/java/org/junit/platform/launcher/tagexpression/Tokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/ConfigurationParametersFactoryForTests.java b/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/ConfigurationParametersFactoryForTests.java index dcf316dd25a1..4444022d2df5 100644 --- a/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/ConfigurationParametersFactoryForTests.java +++ b/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/ConfigurationParametersFactoryForTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/LauncherFactoryForTestingPurposesOnly.java b/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/LauncherFactoryForTestingPurposesOnly.java index 39eff221aa6f..93002b81fe5f 100644 --- a/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/LauncherFactoryForTestingPurposesOnly.java +++ b/junit-platform-launcher/src/testFixtures/java/org/junit/platform/launcher/core/LauncherFactoryForTestingPurposesOnly.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/LegacyReportingUtils.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/LegacyReportingUtils.java index 4b55976dfc63..fd8968f4f829 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/LegacyReportingUtils.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/LegacyReportingUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListener.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListener.java index 49a78541ee9c..10d902884eb2 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListener.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,7 +24,6 @@ import org.apiguardian.api.API; import org.junit.platform.engine.TestExecutionResult; -import org.junit.platform.engine.UniqueId; import org.junit.platform.engine.reporting.ReportEntry; import org.junit.platform.launcher.TestExecutionListener; import org.junit.platform.launcher.TestIdentifier; @@ -107,7 +106,7 @@ public void executionFinished(TestIdentifier testIdentifier, TestExecutionResult private void writeXmlReportInCaseOfRoot(TestIdentifier testIdentifier) { if (isRoot(testIdentifier)) { - String rootName = UniqueId.parse(testIdentifier.getUniqueId()).getSegments().get(0).getValue(); + String rootName = testIdentifier.getUniqueIdObject().getSegments().get(0).getValue(); writeXmlReportSafely(testIdentifier, rootName); } } @@ -123,7 +122,7 @@ private void writeXmlReportSafely(TestIdentifier testIdentifier, String rootName } private boolean isRoot(TestIdentifier testIdentifier) { - return !testIdentifier.getParentId().isPresent(); + return !testIdentifier.getParentIdObject().isPresent(); } private void printException(String message, Exception exception) { diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportData.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportData.java index 9d8fc64c3489..1f7993531af7 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportData.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportData.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportWriter.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportWriter.java index c61ed924c4f1..fd9dd98ded2f 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportWriter.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/legacy/xml/XmlReportWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/JUnitFactory.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/JUnitFactory.java index 3a622f0e7e29..382404bdd7a1 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/JUnitFactory.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/JUnitFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/LegacyReportingName.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/LegacyReportingName.java index 316bbaa775c0..a81214a70c4e 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/LegacyReportingName.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/LegacyReportingName.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListener.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListener.java index b826a63a5296..05c452880a90 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListener.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/Type.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/Type.java index 851486f435d9..49f8d32cbb92 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/Type.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/Type.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/UniqueId.java b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/UniqueId.java index 92a83a283296..4d3ef7b61e81 100644 --- a/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/UniqueId.java +++ b/junit-platform-reporting/src/main/java/org/junit/platform/reporting/open/xml/UniqueId.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatform.java b/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatform.java index 588e44e1026f..bbc87847f7c1 100644 --- a/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatform.java +++ b/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatform.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -191,7 +191,7 @@ public void filter(Filter filter) throws NoTestsRemainException { private LauncherDiscoveryRequest createDiscoveryRequestForUniqueIds(Set testIdentifiers) { // @formatter:off List selectors = testIdentifiers.stream() - .map(TestIdentifier::getUniqueId) + .map(TestIdentifier::getUniqueIdObject) .map(DiscoverySelectors::selectUniqueId) .collect(toList()); // @formatter:on diff --git a/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformRunnerListener.java b/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformRunnerListener.java index f91d6a886f5e..039117187dd4 100644 --- a/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformRunnerListener.java +++ b/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformRunnerListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,6 +15,7 @@ import org.junit.platform.engine.TestExecutionResult; import org.junit.platform.engine.TestExecutionResult.Status; +import org.junit.platform.engine.UniqueId; import org.junit.platform.engine.reporting.ReportEntry; import org.junit.platform.launcher.TestExecutionListener; import org.junit.platform.launcher.TestIdentifier; @@ -37,7 +38,7 @@ class JUnitPlatformRunnerListener implements TestExecutionListener { @Override public void dynamicTestRegistered(TestIdentifier testIdentifier) { - String parentId = testIdentifier.getParentId().get(); + UniqueId parentId = testIdentifier.getParentIdObject().get(); testTree.addDynamicDescription(testIdentifier, parentId); } diff --git a/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformTestTree.java b/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformTestTree.java index 107b8bd95654..cb32dfebc477 100644 --- a/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformTestTree.java +++ b/junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformTestTree.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -25,6 +25,7 @@ import org.junit.platform.commons.util.AnnotationUtils; import org.junit.platform.commons.util.StringUtils; import org.junit.platform.engine.TestSource; +import org.junit.platform.engine.UniqueId; import org.junit.platform.engine.support.descriptor.ClassSource; import org.junit.platform.engine.support.descriptor.MethodSource; import org.junit.platform.launcher.TestIdentifier; @@ -86,7 +87,7 @@ private void buildDescriptionTree(Description suiteDescription, TestPlan testPla testPlan.getRoots().forEach(testIdentifier -> buildDescription(testIdentifier, suiteDescription, testPlan)); } - void addDynamicDescription(TestIdentifier newIdentifier, String parentId) { + void addDynamicDescription(TestIdentifier newIdentifier, UniqueId parentId) { Description parent = getDescription(this.testPlan.getTestIdentifier(parentId)); buildDescription(newIdentifier, parent, this.testPlan); } @@ -103,9 +104,9 @@ private Description createJUnit4Description(TestIdentifier identifier, TestPlan String name = nameExtractor.apply(identifier); if (identifier.isTest()) { String containerName = testPlan.getParent(identifier).map(nameExtractor).orElse(""); - return Description.createTestDescription(containerName, name, identifier.getUniqueId()); + return Description.createTestDescription(containerName, name, identifier.getUniqueIdObject()); } - return Description.createSuiteDescription(name, identifier.getUniqueId()); + return Description.createSuiteDescription(name, identifier.getUniqueIdObject()); } private String getTechnicalName(TestIdentifier testIdentifier) { diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameter.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameter.java index 5dfc28eb24fd..0ab3693bbd80 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameter.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameters.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameters.java index b458701acd09..0f12270a0eb9 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameters.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ConfigurationParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/DisableParentConfigurationParameters.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/DisableParentConfigurationParameters.java index 6ed05a4764ac..d1eed0eebe7c 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/DisableParentConfigurationParameters.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/DisableParentConfigurationParameters.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeClassNamePatterns.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeClassNamePatterns.java index 93b9a5132620..3aa18b8bdc63 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeClassNamePatterns.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeClassNamePatterns.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeEngines.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeEngines.java index 217890b82ee1..e65acb5c7a5c 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeEngines.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeEngines.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludePackages.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludePackages.java index f8e5d95efc69..22b7736c2a0b 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludePackages.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludePackages.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeTags.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeTags.java index b40367d400dc..9d55090efc67 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeTags.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/ExcludeTags.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeClassNamePatterns.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeClassNamePatterns.java index 3f2f1949c21d..5d75fedbb6d9 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeClassNamePatterns.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeClassNamePatterns.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeEngines.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeEngines.java index 4a7258349173..4117947fbf99 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeEngines.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeEngines.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludePackages.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludePackages.java index d36e4c66fd48..7635d1dc3bc6 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludePackages.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludePackages.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeTags.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeTags.java index 2e79ccd4afa1..744dc75a30ed 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeTags.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/IncludeTags.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasses.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasses.java index af6ba7f2c40f..9d0a8d3c661a 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasses.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasses.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResource.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResource.java index 08c7a3d1204c..64d6cc3d4e18 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResource.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResource.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResources.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResources.java index c0be5d431892..a8860b9c0a4e 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResources.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectClasspathResources.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectDirectories.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectDirectories.java index d63020417db5..30d32a533d61 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectDirectories.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectDirectories.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFile.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFile.java index 4fc48cdaf390..88be94546bc1 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFile.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFile.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFiles.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFiles.java index 232e1b4406da..4f4c8fd44ff7 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFiles.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectFiles.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectModules.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectModules.java index 833b995cdfb0..12f90de77417 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectModules.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectModules.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectPackages.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectPackages.java index 57986a22ae40..c2d5eafff60b 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectPackages.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectPackages.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectUris.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectUris.java index bdf929623e17..82512f2faea5 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectUris.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SelectUris.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/Suite.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/Suite.java index 5df5c0892ffc..739d65826de4 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/Suite.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/Suite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SuiteDisplayName.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SuiteDisplayName.java index c474a1dff93e..3cd11cb9ef4e 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SuiteDisplayName.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/SuiteDisplayName.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/UseTechnicalNames.java b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/UseTechnicalNames.java index 561b8dc17772..12b1180841a2 100644 --- a/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/UseTechnicalNames.java +++ b/junit-platform-suite-api/src/main/java/org/junit/platform/suite/api/UseTechnicalNames.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/AdditionalDiscoverySelectors.java b/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/AdditionalDiscoverySelectors.java index 91866aa08c19..99dffdaf15f8 100644 --- a/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/AdditionalDiscoverySelectors.java +++ b/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/AdditionalDiscoverySelectors.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilder.java b/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilder.java index 147539a0fc07..fabe88911782 100644 --- a/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilder.java +++ b/junit-platform-suite-commons/src/main/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/ClassSelectorResolver.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/ClassSelectorResolver.java index 44730efa5624..441dc3f836c9 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/ClassSelectorResolver.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/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 @@ -16,6 +16,8 @@ import java.util.Optional; import java.util.function.Predicate; +import org.junit.platform.commons.logging.Logger; +import org.junit.platform.commons.logging.LoggerFactory; import org.junit.platform.commons.util.ReflectionUtils; import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestDescriptor; @@ -30,6 +32,8 @@ */ final class ClassSelectorResolver implements SelectorResolver { + private static final Logger log = LoggerFactory.getLogger(ClassSelectorResolver.class); + private static final IsSuiteClass isSuiteClass = new IsSuiteClass(); private final Predicate classNameFilter; @@ -94,7 +98,31 @@ private static Resolution toResolution(Optional suite) { private Optional newSuiteDescriptor(Class suiteClass, TestDescriptor parent) { UniqueId id = parent.getUniqueId().append(SuiteTestDescriptor.SEGMENT_TYPE, suiteClass.getName()); + if (containsCycle(id)) { + log.config(() -> createConfigContainsCycleMessage(suiteClass, id)); + return Optional.empty(); + } + return Optional.of(new SuiteTestDescriptor(id, suiteClass, configurationParameters)); } + private static boolean containsCycle(UniqueId id) { + List segments = id.getSegments(); + List engineAndSuiteSegment = segments.subList(segments.size() - 2, segments.size()); + List ancestorSegments = segments.subList(0, segments.size() - 2); + for (int i = 0; i < ancestorSegments.size() - 1; i++) { + List candidate = ancestorSegments.subList(i, i + 2); + if (engineAndSuiteSegment.equals(candidate)) { + return true; + } + } + return false; + } + + private static String createConfigContainsCycleMessage(Class suiteClass, UniqueId suiteId) { + return String.format( + "The suite configuration of [%s] resulted in a cycle [%s] and will not be discovered a second time.", + suiteClass.getName(), suiteId); + } + } diff --git a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/DiscoverySelectorResolver.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/DiscoverySelectorResolver.java index 79f9d8cbf98f..f9c20e5acca9 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/DiscoverySelectorResolver.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/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-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/IsPotentialTestContainer.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/IsPotentialTestContainer.java index 3a9cbcdc0a26..9e6816af646a 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/IsPotentialTestContainer.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/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-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/IsSuiteClass.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/IsSuiteClass.java index 948f06751529..f336c03fa746 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/IsSuiteClass.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/IsSuiteClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/NoTestsDiscoveredException.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/NoTestsDiscoveredException.java index 5307c8dc3a64..966cfcbe025e 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/NoTestsDiscoveredException.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/NoTestsDiscoveredException.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteEngineDescriptor.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteEngineDescriptor.java index 31b4b49a99ed..3c351b2eba46 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteEngineDescriptor.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteEngineDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteLauncher.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteLauncher.java index 7be8d79703b8..af776ef84f46 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteLauncher.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteLauncher.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestDescriptor.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestDescriptor.java index aa7c354f9a87..52cb4e1166fe 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestDescriptor.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,14 +10,9 @@ package org.junit.platform.suite.engine; -import static java.util.function.Function.identity; -import static java.util.stream.Collectors.counting; -import static java.util.stream.Collectors.groupingBy; import static org.junit.platform.commons.util.AnnotationUtils.findAnnotation; import static org.junit.platform.suite.commons.SuiteLauncherDiscoveryRequestBuilder.request; -import java.util.function.Supplier; - import org.junit.platform.commons.JUnitException; import org.junit.platform.commons.util.Preconditions; import org.junit.platform.commons.util.StringUtils; @@ -26,7 +21,6 @@ import org.junit.platform.engine.TestDescriptor; import org.junit.platform.engine.TestExecutionResult; import org.junit.platform.engine.UniqueId; -import org.junit.platform.engine.UniqueId.Segment; import org.junit.platform.engine.discovery.DiscoverySelectors; import org.junit.platform.engine.support.descriptor.AbstractTestDescriptor; import org.junit.platform.engine.support.descriptor.ClassSource; @@ -60,28 +54,12 @@ final class SuiteTestDescriptor extends AbstractTestDescriptor { private SuiteLauncher launcher; SuiteTestDescriptor(UniqueId id, Class suiteClass, ConfigurationParameters configurationParameters) { - super(requireNoCycles(id), getSuiteDisplayName(suiteClass), ClassSource.from(suiteClass)); + super(id, getSuiteDisplayName(suiteClass), ClassSource.from(suiteClass)); this.configurationParameters = configurationParameters; this.failIfNoTests = getFailIfNoTests(suiteClass); this.suiteClass = suiteClass; } - private static UniqueId requireNoCycles(UniqueId id) { - // @formatter:off - boolean containsCycle = id.getSegments().stream() - .filter(segment -> SuiteTestDescriptor.SEGMENT_TYPE.equals(segment.getType())) - .map(Segment::getValue) - .collect(groupingBy(identity(), counting())) - .values() - .stream() - .anyMatch(count -> count > 1); - // @formatter:on - Supplier message = () -> String.format( - "Configuration error: The suite configuration may not contain a cycle [%s]", id); - Preconditions.condition(!containsCycle, message); - return id; - } - private static Boolean getFailIfNoTests(Class suiteClass) { // @formatter:off return findAnnotation(suiteClass, Suite.class) diff --git a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestEngine.java b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestEngine.java index e7c54bac8726..96b353392b27 100644 --- a/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestEngine.java +++ b/junit-platform-suite-engine/src/main/java/org/junit/platform/suite/engine/SuiteTestEngine.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Assertions.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Assertions.java index 9ef8358f6085..74015e8818eb 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Assertions.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/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-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineExecutionResults.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineExecutionResults.java index 6475a0a73b67..bce1db1c4a88 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineExecutionResults.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineExecutionResults.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineTestKit.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineTestKit.java index a41f358c4455..195c223ffcb1 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineTestKit.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EngineTestKit.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Event.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Event.java index 65b9ceaf5fe3..63c69409b381 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Event.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Event.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventConditions.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventConditions.java index 931e39e67ec3..f1aa473435c0 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventConditions.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventStatistics.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventStatistics.java index f1db3d05a9ab..fda7d1d8b2ef 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventStatistics.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventStatistics.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventType.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventType.java index dc22e3e26600..1fed5b9b67ba 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventType.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/EventType.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Events.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Events.java index a981a94100a9..01481ac30fce 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Events.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Events.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Execution.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Execution.java index 7f1e4b4066a1..be14554e79b7 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Execution.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/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-platform-testkit/src/main/java/org/junit/platform/testkit/engine/ExecutionRecorder.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/ExecutionRecorder.java index 0db82a47852f..b11a1e44b8fb 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/ExecutionRecorder.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/ExecutionRecorder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java index b87fc9b8fc24..6ef7a89e29d3 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/Executions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TerminationInfo.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TerminationInfo.java index 4b70aca9beb7..e3875c8ce0d3 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TerminationInfo.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TerminationInfo.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TestExecutionResultConditions.java b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TestExecutionResultConditions.java index 8c7bcbf72c29..21ff73e7e4b5 100644 --- a/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TestExecutionResultConditions.java +++ b/junit-platform-testkit/src/main/java/org/junit/platform/testkit/engine/TestExecutionResultConditions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/junit-vintage-engine.gradle.kts b/junit-vintage-engine/junit-vintage-engine.gradle.kts index 0bb61a54d686..b92fffa50337 100644 --- a/junit-vintage-engine/junit-vintage-engine.gradle.kts +++ b/junit-vintage-engine/junit-vintage-engine.gradle.kts @@ -28,7 +28,7 @@ dependencies { tasks { compileTestFixturesGroovy { - javaLauncher.set(project.the().launcherFor { + javaLauncher.set(project.javaToolchains.launcherFor { // Groovy 2.x (used for Spock tests) does not support current JDKs languageVersion.set(JavaLanguageVersion.of(8)) }) diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/JUnit4VersionCheck.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/JUnit4VersionCheck.java index dafea5acd5d8..8c5f1f276015 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/JUnit4VersionCheck.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/JUnit4VersionCheck.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java index bce12f52d451..fb52f79bf06e 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/VintageTestEngine.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/DescriptionUtils.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/DescriptionUtils.java index 59f20cea9026..3cc89c7e33e8 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/DescriptionUtils.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/DescriptionUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/OrFilter.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/OrFilter.java index 39e1046146de..5bf9bf713ee5 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/OrFilter.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/OrFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerDecorator.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerDecorator.java index 87f5fbfd9237..d81b64f1f41c 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerDecorator.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerDecorator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerRequest.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerRequest.java index 5390b5c94ae0..bb9037c2b7e0 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerRequest.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerTestDescriptor.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerTestDescriptor.java index 56b03e625b83..0ad3c5f9b6a0 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerTestDescriptor.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/RunnerTestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/TestSourceProvider.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/TestSourceProvider.java index 31886aa782a9..e5b327a2d1dc 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/TestSourceProvider.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/TestSourceProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageEngineDescriptor.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageEngineDescriptor.java index 6af85def05f6..9e0450fa9a01 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageEngineDescriptor.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageEngineDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageTestDescriptor.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageTestDescriptor.java index 6b06a9e4c5e6..d8a64ba7c293 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageTestDescriptor.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/descriptor/VintageTestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/ClassSelectorResolver.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/ClassSelectorResolver.java index 3700e5f92b40..a2d1e7d4c80c 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/ClassSelectorResolver.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/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-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/DefensiveAllDefaultPossibilitiesBuilder.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/DefensiveAllDefaultPossibilitiesBuilder.java index 1d4b6fe9d533..0da94f689fde 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/DefensiveAllDefaultPossibilitiesBuilder.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/DefensiveAllDefaultPossibilitiesBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/FilterableIgnoringRunnerDecorator.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/FilterableIgnoringRunnerDecorator.java index d586dfca6bb4..636ef2554802 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/FilterableIgnoringRunnerDecorator.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/FilterableIgnoringRunnerDecorator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IgnoringRunnerDecorator.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IgnoringRunnerDecorator.java index dacdba625de9..3b5597e51169 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IgnoringRunnerDecorator.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IgnoringRunnerDecorator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClass.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClass.java index ca4b12ad2f9e..91b9b1837adb 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClass.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestMethod.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestMethod.java index 6c92c551046f..d382a606496d 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestMethod.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/MethodSelectorResolver.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/MethodSelectorResolver.java index c37a744591d4..724e9a0231f9 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/MethodSelectorResolver.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/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-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessor.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessor.java index 9f10e5fe2ba0..b9948537521a 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessor.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/UniqueIdFilter.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/UniqueIdFilter.java index 2a68fd5d57af..24685c55aed6 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/UniqueIdFilter.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/UniqueIdFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/VintageDiscoverer.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/VintageDiscoverer.java index b899aef37f58..427526bfeb14 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/VintageDiscoverer.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/discovery/VintageDiscoverer.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/EventType.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/EventType.java index 3ebc5c802296..949cc4363330 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/EventType.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/EventType.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunListenerAdapter.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunListenerAdapter.java index 40760f923480..9cefb8faee30 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunListenerAdapter.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunListenerAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -93,7 +93,7 @@ public void testSuiteFinished(Description description) { RunnerTestDescriptor runnerTestDescriptor = testRun.getRunnerTestDescriptor(); // runnerTestDescriptor is reported in testRunFinished if (!runnerTestDescriptor.getDescription().equals(description)) { - reportContainerFinished(lookupOrRegisterNextTestDescriptor(description)); + reportContainerFinished(lookupOrRegisterCurrentTestDescriptor(description)); } } diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunnerExecutor.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunnerExecutor.java index 87c12c274e1b..23fad4dea5c5 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunnerExecutor.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/RunnerExecutor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/TestRun.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/TestRun.java index 53820bf6c543..1e46e0e4a9e3 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/TestRun.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/execution/TestRun.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdReader.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdReader.java index 9c7fb87717bc..35a90736a831 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdReader.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdStringifier.java b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdStringifier.java index 5a0f815a3ff3..6c2846e1ac47 100644 --- a/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdStringifier.java +++ b/junit-vintage-engine/src/main/java/org/junit/vintage/engine/support/UniqueIdStringifier.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4ParameterizedTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4ParameterizedTests.java index d6bec3b2ecfb..bb533dbc1fc5 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4ParameterizedTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4ParameterizedTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4VersionCheckTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4VersionCheckTests.java index b9ca1e7355eb..4df0e86a7ba5 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4VersionCheckTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/JUnit4VersionCheckTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageLauncherIntegrationTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageLauncherIntegrationTests.java index 9b204236f5be..cb12669aef13 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageLauncherIntegrationTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageLauncherIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineBasicTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineBasicTests.java index 2bbf685e67ed..e78df198bc8c 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineBasicTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineBasicTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineDiscoveryTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineDiscoveryTests.java index a8d07f7f1b52..b89470cf92bc 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineDiscoveryTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineDiscoveryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineExecutionTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineExecutionTests.java index 50643844ed99..66af815aff99 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineExecutionTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineExecutionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -62,6 +62,7 @@ import org.junit.vintage.engine.samples.junit4.CompletelyDynamicTestCase; import org.junit.vintage.engine.samples.junit4.EmptyIgnoredTestCase; import org.junit.vintage.engine.samples.junit4.EnclosedJUnit4TestCase; +import org.junit.vintage.engine.samples.junit4.EnclosedWithParameterizedChildrenJUnit4TestCase; import org.junit.vintage.engine.samples.junit4.IgnoredJUnit4TestCase; import org.junit.vintage.engine.samples.junit4.IgnoredParameterizedTestCase; import org.junit.vintage.engine.samples.junit4.JUnit4SuiteOfSuiteWithIgnoredJUnit4TestCase; @@ -172,6 +173,39 @@ void executesEnclosedJUnit4TestCase() { event(engine(), finishedSuccessfully())); } + @Test + void executesEnclosedWithParameterizedChildrenJUnit4TestCase() { + Class testClass = EnclosedWithParameterizedChildrenJUnit4TestCase.class; + String commonNestedClassPrefix = EnclosedWithParameterizedChildrenJUnit4TestCase.class.getName() + + "$NestedTestCase"; + + execute(testClass).allEvents().debug().assertEventsMatchExactly( // + event(engine(), started()), // + event(container(testClass), started()), // + event(container(commonNestedClassPrefix), started()), // + event(container("[0]"), started()), // + event(test("test[0]"), started()), // + event(test("test[0]"), finishedSuccessfully()), // + event(container("[0]"), finishedSuccessfully()), // + event(container("[1]"), started()), // + event(test("test[1]"), started()), // + event(test("test[1]"), finishedSuccessfully()), // + event(container("[1]"), finishedSuccessfully()), // + event(container(commonNestedClassPrefix), finishedSuccessfully()), // + event(container(commonNestedClassPrefix), started()), // + event(container("[0]"), started()), // + event(test("test[0]"), started()), // + event(test("test[0]"), finishedSuccessfully()), // + event(container("[0]"), finishedSuccessfully()), // + event(container("[1]"), started()), // + event(test("test[1]"), started()), // + event(test("test[1]"), finishedSuccessfully()), // + event(container("[1]"), finishedSuccessfully()), // + event(container(commonNestedClassPrefix), finishedSuccessfully()), // + event(container(testClass), finishedSuccessfully()), // + event(engine(), finishedSuccessfully())); + } + @Test void executesJUnit4SuiteWithJUnit3SuiteWithSingleTestCase() { Class junit4SuiteClass = JUnit4SuiteWithJUnit3SuiteWithSingleTestCase.class; diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineTestSuite.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineTestSuite.java index 76a12af05ea2..62f9f6c80897 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineTestSuite.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageTestEngineTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageUniqueIdBuilder.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageUniqueIdBuilder.java index fdc3e813b804..88fdd91502a9 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageUniqueIdBuilder.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/VintageUniqueIdBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/DescriptionUtilsTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/DescriptionUtilsTests.java index fc3083c8bf1a..10247cb75e30 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/DescriptionUtilsTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/DescriptionUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/OrFilterTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/OrFilterTests.java index 307c78c7a802..572b4e7f5ba9 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/OrFilterTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/OrFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/TestSourceProviderTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/TestSourceProviderTests.java index 8e6c74444f39..8211f75983e2 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/TestSourceProviderTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/TestSourceProviderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/VintageTestDescriptorTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/VintageTestDescriptorTests.java index 7690c47d4ced..58be5a839128 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/VintageTestDescriptorTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/descriptor/VintageTestDescriptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClassTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClassTests.java index 65ccd5ea1037..442daa53d3d8 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClassTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/IsPotentialJUnit4TestClassTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessorTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessorTests.java index 9a3cc044f941..6b64d1afa10f 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessorTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/RunnerTestDescriptorPostProcessorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/VintageDiscovererTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/VintageDiscovererTests.java index 70294b3ce48f..754c34b03a3d 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/VintageDiscovererTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/discovery/VintageDiscovererTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/execution/TestRunTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/execution/TestRunTests.java index dd48ef2550ae..69272fd511db 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/execution/TestRunTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/execution/TestRunTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdReaderTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdReaderTests.java index 90341229dcdd..3ea9cca2abc8 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdReaderTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdReaderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdStringifierTests.java b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdStringifierTests.java index f3b423b461eb..6ec8e41a0b36 100644 --- a/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdStringifierTests.java +++ b/junit-vintage-engine/src/test/java/org/junit/vintage/engine/support/UniqueIdStringifierTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/PlainOldJavaClassWithoutAnyTestsTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/PlainOldJavaClassWithoutAnyTestsTestCase.java index 107b07c3f887..cad6044ab55e 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/PlainOldJavaClassWithoutAnyTestsTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/PlainOldJavaClassWithoutAnyTestsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/AbstractJUnit3TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/AbstractJUnit3TestCase.java index 7a90cc206ada..ec7f01e9322c 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/AbstractJUnit3TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/AbstractJUnit3TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3ParallelSuiteWithSubsuites.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3ParallelSuiteWithSubsuites.java index 2c37a851c288..0171e86ed846 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3ParallelSuiteWithSubsuites.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3ParallelSuiteWithSubsuites.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSingleTestCaseWithSingleTestWhichFails.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSingleTestCaseWithSingleTestWhichFails.java index 283290e8ce54..a253e2f4d571 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSingleTestCaseWithSingleTestWhichFails.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSingleTestCaseWithSingleTestWhichFails.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSubsuites.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSubsuites.java index 351ec840fea7..cb070d7738f7 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSubsuites.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/JUnit3SuiteWithSubsuites.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/PlainJUnit3TestCaseWithSingleTestWhichFails.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/PlainJUnit3TestCaseWithSingleTestWhichFails.java index d05dc143f2a0..17918c65bb5a 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/PlainJUnit3TestCaseWithSingleTestWhichFails.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit3/PlainJUnit3TestCaseWithSingleTestWhichFails.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJUnit4TestCase.java index 31cc165b9e2f..6c18d8fbee90 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJUnit4TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJUnit4TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJunit4TestCaseWithConstructorParameter.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJunit4TestCaseWithConstructorParameter.java index 958db3e27d14..b25e11801918 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJunit4TestCaseWithConstructorParameter.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/AbstractJunit4TestCaseWithConstructorParameter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/Categories.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/Categories.java index 1d61e5507991..9cc5794815a8 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/Categories.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/Categories.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/CompletelyDynamicTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/CompletelyDynamicTestCase.java index 0dd49cb5326f..2331a56b6037 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/CompletelyDynamicTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/CompletelyDynamicTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConcreteJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConcreteJUnit4TestCase.java index 0dc636545d2e..e659b5953a20 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConcreteJUnit4TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConcreteJUnit4TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConfigurableRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConfigurableRunner.java index b500ac4ed8ba..47400e9465da 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConfigurableRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ConfigurableRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/DynamicRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/DynamicRunner.java index 822a881afd99..20f3238abe0b 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/DynamicRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/DynamicRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EmptyIgnoredTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EmptyIgnoredTestCase.java index b62cc734179d..69f53e2d9956 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EmptyIgnoredTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EmptyIgnoredTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EnclosedJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EnclosedJUnit4TestCase.java index d4cc092db6a3..dec70cc9c8a3 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EnclosedJUnit4TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EnclosedJUnit4TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EnclosedWithParameterizedChildrenJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EnclosedWithParameterizedChildrenJUnit4TestCase.java new file mode 100644 index 000000000000..dce4f50c723a --- /dev/null +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/EnclosedWithParameterizedChildrenJUnit4TestCase.java @@ -0,0 +1,59 @@ +/* + * Copyright 2015-2023 the original author or 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 + */ + +package org.junit.vintage.engine.samples.junit4; + +import java.util.Arrays; +import java.util.Collection; + +import org.junit.Test; +import org.junit.experimental.runners.Enclosed; +import org.junit.runner.RunWith; +import org.junit.runners.Parameterized; +import org.junit.runners.Parameterized.Parameters; + +// Source: https://github.com/junit-team/junit5/issues/3083 +@RunWith(Enclosed.class) +public class EnclosedWithParameterizedChildrenJUnit4TestCase { + + @RunWith(Parameterized.class) + public static class NestedTestCase1 { + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[] { 1, 2 }, new Object[] { 3, 4 }); + } + + @SuppressWarnings("unused") + public NestedTestCase1(final int a, final int b) { + } + + @Test + public void test() { + } + } + + @RunWith(Parameterized.class) + public static class NestedTestCase2 { + + @Parameters + public static Collection data() { + return Arrays.asList(new Object[] { 1, 2 }, new Object[] { 3, 4 }); + } + + @SuppressWarnings("unused") + public NestedTestCase2(final int a, final int b) { + } + + @Test + public void test() { + } + } +} diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ExceptionThrowingRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ExceptionThrowingRunner.java index 082d24beff0d..146d659ca116 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ExceptionThrowingRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ExceptionThrowingRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCase.java index eef9d8bd293a..19d53de56896 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCaseWithNotFilterableRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCaseWithNotFilterableRunner.java index 21a6f2a19d01..dd19ad0ad46b 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCaseWithNotFilterableRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredJUnit4TestCaseWithNotFilterableRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredParameterizedTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredParameterizedTestCase.java index 38371372d03e..0c127b5bc363 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredParameterizedTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/IgnoredParameterizedTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4ParameterizedTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4ParameterizedTestCase.java index d031e2428590..705f2b891915 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4ParameterizedTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4ParameterizedTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithFilterableChildRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithFilterableChildRunner.java index 4c7d2a5620bb..5b8a1284a004 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithFilterableChildRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithFilterableChildRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithIgnoredJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithIgnoredJUnit4TestCase.java index 1c8b4812107a..04c4aed2ed34 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithIgnoredJUnit4TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithIgnoredJUnit4TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java index 0f437a9df3cf..271cda1804c0 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithErrorInBeforeClass.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithErrorInBeforeClass.java index 6f057ff1ecfa..66b0273f44a6 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithErrorInBeforeClass.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteOfSuiteWithJUnit4TestCaseWithErrorInBeforeClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithExceptionThrowingRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithExceptionThrowingRunner.java index 7c0ca261da93..01dd3aebddd5 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithExceptionThrowingRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithExceptionThrowingRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithIgnoredJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithIgnoredJUnit4TestCase.java index 012fe8f5776d..c1f1279a5053 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithIgnoredJUnit4TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithIgnoredJUnit4TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit3SuiteWithSingleTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit3SuiteWithSingleTestCase.java index 7e9a628c79bb..aa4c409480a8 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit3SuiteWithSingleTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit3SuiteWithSingleTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java index 1ba923d1a560..6f2e3673091c 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithAssumptionFailureInBeforeClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithErrorInBeforeClass.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithErrorInBeforeClass.java index e94a473c1159..56bc1bd23452 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithErrorInBeforeClass.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithErrorInBeforeClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java index 63f2221184fc..7e4dc1b0d22a 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java index e368fe3bff07..b784ffde17fd 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithJUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithPlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithPlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java index 6dd5ac07244b..a6e652024510 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithPlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithPlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithTwoTestCases.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithTwoTestCases.java index 6996b22ab070..4cf0eed133d1 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithTwoTestCases.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4SuiteWithTwoTestCases.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithAssumptionFailureInBeforeClass.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithAssumptionFailureInBeforeClass.java index aafbd4915e4e..f06d3fe81998 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithAssumptionFailureInBeforeClass.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithAssumptionFailureInBeforeClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithDistinguishableOverloadedMethod.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithDistinguishableOverloadedMethod.java index 33fc9d48bed5..10f77db2df12 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithDistinguishableOverloadedMethod.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithDistinguishableOverloadedMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorCollectorStoringMultipleFailures.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorCollectorStoringMultipleFailures.java index 802d23c5a720..090e04011b10 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorCollectorStoringMultipleFailures.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorCollectorStoringMultipleFailures.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInAfterClass.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInAfterClass.java index 9c0029bb2a37..2cb44e601759 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInAfterClass.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInAfterClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInBeforeClass.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInBeforeClass.java index 7a3e05f8897b..dd3afe5eb616 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInBeforeClass.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithErrorInBeforeClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithExceptionThrowingRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithExceptionThrowingRunner.java index 3428266f3123..443296756b6b 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithExceptionThrowingRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithExceptionThrowingRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java index 98e29bbbc0a8..b1816d2ad44a 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithFailingDescriptionThatIsNotReportedAsFinished.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithIndistinguishableOverloadedMethod.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithIndistinguishableOverloadedMethod.java index ff5fc5b4de62..6d4099db0615 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithIndistinguishableOverloadedMethod.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithIndistinguishableOverloadedMethod.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithNotFilterableRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithNotFilterableRunner.java index aa2af4f8bbae..9ece2415312f 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithNotFilterableRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithNotFilterableRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java index 1c279a3773e3..8906ce6864a3 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithCustomUniqueIdsAndDisplayNames.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithDuplicateChangingChildDescriptions.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithDuplicateChangingChildDescriptions.java index c8906f9792ed..aa039daf1a65 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithDuplicateChangingChildDescriptions.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/JUnit4TestCaseWithRunnerWithDuplicateChangingChildDescriptions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/MalformedJUnit4TestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/MalformedJUnit4TestCase.java index 567d58d9830f..87480a21960b 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/MalformedJUnit4TestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/MalformedJUnit4TestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/NotFilterableRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/NotFilterableRunner.java index e14dc1430879..4eb6bea4069e 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/NotFilterableRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/NotFilterableRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTestCase.java index 8fe64bc90895..ec09442767f3 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTimingTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTimingTestCase.java index 9b283b7184c5..a9905cbe96fd 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTimingTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedTimingTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithAfterParamFailureTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithAfterParamFailureTestCase.java index adbda57c66d8..a6852f992030 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithAfterParamFailureTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithAfterParamFailureTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithBeforeParamFailureTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithBeforeParamFailureTestCase.java index 0faa44830050..515f8d4ea633 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithBeforeParamFailureTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/ParameterizedWithBeforeParamFailureTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithFiveTestMethods.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithFiveTestMethods.java index d23fc97d69ec..08fe68db3f08 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithFiveTestMethods.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithFiveTestMethods.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithLifecycleMethods.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithLifecycleMethods.java index b1bebc7f2c7f..c629a21707a5 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithLifecycleMethods.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithLifecycleMethods.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleInheritedTestWhichFails.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleInheritedTestWhichFails.java index 6a983af10af9..6ac3601bf9d6 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleInheritedTestWhichFails.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleInheritedTestWhichFails.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichFails.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichFails.java index 7eb944ef63b9..de6ac2b1ac0e 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichFails.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichFails.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java index 456c21b1492d..fb80eb65be49 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithSingleTestWhichIsIgnored.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithTwoTestMethods.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithTwoTestMethods.java index db54c9bd3b05..ffd2cdc0c0cc 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithTwoTestMethods.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/PlainJUnit4TestCaseWithTwoTestMethods.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerThatOnlyReportsFailures.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerThatOnlyReportsFailures.java index 3425fbc48bb2..dd94df329162 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerThatOnlyReportsFailures.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerThatOnlyReportsFailures.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerWithCustomUniqueIdsAndDisplayNames.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerWithCustomUniqueIdsAndDisplayNames.java index 8fe637ff2005..1cf2140d57cd 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerWithCustomUniqueIdsAndDisplayNames.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/RunnerWithCustomUniqueIdsAndDisplayNames.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/SingleFailingTheoryTestCase.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/SingleFailingTheoryTestCase.java index bc448b7b7e4c..1718b50acbcf 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/SingleFailingTheoryTestCase.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/SingleFailingTheoryTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/TestCaseRunWithJUnitPlatformRunner.java b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/TestCaseRunWithJUnitPlatformRunner.java index 24e4a5d25b99..e4074c2f4fa7 100644 --- a/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/TestCaseRunWithJUnitPlatformRunner.java +++ b/junit-vintage-engine/src/testFixtures/java/org/junit/vintage/engine/samples/junit4/TestCaseRunWithJUnitPlatformRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/jmh/java/org/junit/jupiter/jmh/AssertionBenchmarks.java b/platform-tests/src/jmh/java/org/junit/jupiter/jmh/AssertionBenchmarks.java index e74589c0fc84..97136ecdb9a4 100644 --- a/platform-tests/src/jmh/java/org/junit/jupiter/jmh/AssertionBenchmarks.java +++ b/platform-tests/src/jmh/java/org/junit/jupiter/jmh/AssertionBenchmarks.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/DefaultPackageTestCase.java b/platform-tests/src/test/java/DefaultPackageTestCase.java index 6d77e4eb7013..8018c935f497 100644 --- a/platform-tests/src/test/java/DefaultPackageTestCase.java +++ b/platform-tests/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/platform-tests/src/test/java/org/junit/jupiter/api/condition/OSTests.java b/platform-tests/src/test/java/org/junit/jupiter/api/condition/OSTests.java index 5c4ff657964a..714869b603d7 100644 --- a/platform-tests/src/test/java/org/junit/jupiter/api/condition/OSTests.java +++ b/platform-tests/src/test/java/org/junit/jupiter/api/condition/OSTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/jupiter/extensions/Heavyweight.java b/platform-tests/src/test/java/org/junit/jupiter/extensions/Heavyweight.java index facddc9c270f..dd2df97c8510 100644 --- a/platform-tests/src/test/java/org/junit/jupiter/extensions/Heavyweight.java +++ b/platform-tests/src/test/java/org/junit/jupiter/extensions/Heavyweight.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/jupiter/extensions/HeavyweightTests.java b/platform-tests/src/test/java/org/junit/jupiter/extensions/HeavyweightTests.java index dc0f5af28a60..2d316392c079 100644 --- a/platform-tests/src/test/java/org/junit/jupiter/extensions/HeavyweightTests.java +++ b/platform-tests/src/test/java/org/junit/jupiter/extensions/HeavyweightTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/AbstractEqualsAndHashCodeTests.java b/platform-tests/src/test/java/org/junit/platform/AbstractEqualsAndHashCodeTests.java index d7c7bffe67b7..8fdd06ae2021 100644 --- a/platform-tests/src/test/java/org/junit/platform/AbstractEqualsAndHashCodeTests.java +++ b/platform-tests/src/test/java/org/junit/platform/AbstractEqualsAndHashCodeTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/JUnitPlatformTestSuite.java b/platform-tests/src/test/java/org/junit/platform/JUnitPlatformTestSuite.java index 2921f47053a5..48633071c35a 100644 --- a/platform-tests/src/test/java/org/junit/platform/JUnitPlatformTestSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/JUnitPlatformTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/TestEngineTests.java b/platform-tests/src/test/java/org/junit/platform/TestEngineTests.java index 6bcc4fb67c3c..fc3e8f13df41 100644 --- a/platform-tests/src/test/java/org/junit/platform/TestEngineTests.java +++ b/platform-tests/src/test/java/org/junit/platform/TestEngineTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/annotation/TestableAnnotationTests.java b/platform-tests/src/test/java/org/junit/platform/commons/annotation/TestableAnnotationTests.java index 29181e5b3e12..611a30bf6cff 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/annotation/TestableAnnotationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/annotation/TestableAnnotationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/function/TryTests.java b/platform-tests/src/test/java/org/junit/platform/commons/function/TryTests.java index 51d4819053bd..52d466ffe15a 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/function/TryTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/function/TryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/support/AnnotationSupportTests.java b/platform-tests/src/test/java/org/junit/platform/commons/support/AnnotationSupportTests.java index 7758c0e48c9c..8675d0384d17 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/support/AnnotationSupportTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/support/AnnotationSupportTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/support/ClassSupportTests.java b/platform-tests/src/test/java/org/junit/platform/commons/support/ClassSupportTests.java index c9ad70889c01..05352fa97e15 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/support/ClassSupportTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/support/ClassSupportTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/support/ModifierSupportTests.java b/platform-tests/src/test/java/org/junit/platform/commons/support/ModifierSupportTests.java index 50a7221d35a6..9bc39a1a9f09 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/support/ModifierSupportTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/support/ModifierSupportTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/support/PreconditionAssertions.java b/platform-tests/src/test/java/org/junit/platform/commons/support/PreconditionAssertions.java index 0e3cb4fb4031..bd7a3fe17638 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/support/PreconditionAssertions.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/support/PreconditionAssertions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/support/ReflectionSupportTests.java b/platform-tests/src/test/java/org/junit/platform/commons/support/ReflectionSupportTests.java index e2629e05043a..f14ff26e1fc4 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/support/ReflectionSupportTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/support/ReflectionSupportTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -48,7 +48,7 @@ class ReflectionSupportTests { void loadClassDelegates() { assertEquals(ReflectionUtils.loadClass("-"), ReflectionSupport.loadClass("-")); assertEquals(ReflectionUtils.loadClass("A"), ReflectionSupport.loadClass("A")); - assertEquals(ReflectionUtils.loadClass("java.io.Bits"), ReflectionSupport.loadClass("java.io.Bits")); + assertEquals(ReflectionUtils.loadClass("java.nio.Bits"), ReflectionSupport.loadClass("java.nio.Bits")); } @Test @@ -64,7 +64,8 @@ void tryToLoadClassDelegates() { ReflectionSupport.tryToLoadClass("-").toOptional()); assertEquals(ReflectionUtils.tryToLoadClass("A").toOptional(), ReflectionSupport.tryToLoadClass("A").toOptional()); - assertEquals(ReflectionUtils.tryToLoadClass("java.io.Bits"), ReflectionSupport.tryToLoadClass("java.io.Bits")); + assertEquals(ReflectionUtils.tryToLoadClass("java.nio.Bits"), + ReflectionSupport.tryToLoadClass("java.nio.Bits")); } @Test diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/AnnotationUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/AnnotationUtilsTests.java index e591c46e20c6..478491014be1 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/AnnotationUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/AnnotationUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ClassLoaderUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ClassLoaderUtilsTests.java index bce8b8c6c267..87d793a051cc 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ClassLoaderUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ClassLoaderUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ClassNamePatternFilterUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ClassNamePatternFilterUtilsTests.java index 575c649480bf..7f0d6a7f34ff 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ClassNamePatternFilterUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ClassNamePatternFilterUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ClassUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ClassUtilsTests.java index 4d54305c1f25..015e60b40cb3 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ClassUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ClassUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ClasspathScannerTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ClasspathScannerTests.java index e3de9a5f4be4..69c2a8f778fe 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ClasspathScannerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ClasspathScannerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/CollectionUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/CollectionUtilsTests.java index db8bdad2433f..f2c4745cc7af 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/CollectionUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/CollectionUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ExceptionUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ExceptionUtilsTests.java index d7395b41a653..b3750f5290c8 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ExceptionUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ExceptionUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/FunctionUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/FunctionUtilsTests.java index 523cff7b3a8f..a543c6528482 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/FunctionUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/FunctionUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/LruCacheTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/LruCacheTests.java index 59a7d3f61f17..7d7d6168c2a3 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/LruCacheTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/LruCacheTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ModuleUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ModuleUtilsTests.java index 533cb17d61ca..5b8a42b547a9 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ModuleUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ModuleUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -12,7 +12,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; /** @@ -23,7 +22,6 @@ class ModuleUtilsTests { @Test - @Disabled("modules") void isJavaPlatformModuleSystemAvailable() { boolean expected; try { diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/PackageUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/PackageUtilsTests.java index 3f0a5ab3455f..009ba2c5ce16 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/PackageUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/PackageUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/PreconditionsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/PreconditionsTests.java index 3978a0c57342..b525437b19d9 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/PreconditionsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/PreconditionsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsTests.java index 9744850a9da6..d667bce7767b 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsWithGenericTypeHierarchiesTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsWithGenericTypeHierarchiesTests.java index 1ba6577e08ba..8e8bb060be53 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsWithGenericTypeHierarchiesTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsWithGenericTypeHierarchiesTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/RuntimeUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/RuntimeUtilsTests.java index 69aa54c40ae8..4174ab46b576 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/RuntimeUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/RuntimeUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/SerializationUtils.java b/platform-tests/src/test/java/org/junit/platform/commons/util/SerializationUtils.java index 4feda4bcb7e8..f6989b4e9f62 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/SerializationUtils.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/SerializationUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/StringUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/StringUtilsTests.java index 55ce3b2faa30..d74b1d523e21 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/StringUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/StringUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/ToStringBuilderTests.java b/platform-tests/src/test/java/org/junit/platform/commons/util/ToStringBuilderTests.java index e35c98952a85..9802f344c582 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/ToStringBuilderTests.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/ToStringBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AExecutionConditionClass.java b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AExecutionConditionClass.java index e1940461af57..d9d4b2ff73dd 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AExecutionConditionClass.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AExecutionConditionClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/ATestExecutionListenerClass.java b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/ATestExecutionListenerClass.java index 774346f3a08f..99ad33e0b01e 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/ATestExecutionListenerClass.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/ATestExecutionListenerClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AVanillaEmpty.java b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AVanillaEmpty.java index 40e7a28173ab..bda71e43b3ec 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AVanillaEmpty.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/AVanillaEmpty.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BExecutionConditionClass.java b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BExecutionConditionClass.java index dadae6fdc9bb..a06b33004175 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BExecutionConditionClass.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BExecutionConditionClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BTestExecutionListenerClass.java b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BTestExecutionListenerClass.java index 65337f4fcf4f..f8e9f5f2428d 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BTestExecutionListenerClass.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BTestExecutionListenerClass.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BVanillaEmpty.java b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BVanillaEmpty.java index 041e7ecf4fe6..0ddbb17213a9 100644 --- a/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BVanillaEmpty.java +++ b/platform-tests/src/test/java/org/junit/platform/commons/util/classes/BVanillaEmpty.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/ConsoleDetailsTests.java b/platform-tests/src/test/java/org/junit/platform/console/ConsoleDetailsTests.java index 499c3396a0e7..1ed5017d39f7 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/ConsoleDetailsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/ConsoleDetailsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherExecutionResultTests.java b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherExecutionResultTests.java index 475bf2cd91fa..1d37cfc93e5b 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherExecutionResultTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherExecutionResultTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,7 +24,7 @@ class ConsoleLauncherExecutionResultTests { private final CommandLineOptions options = new CommandLineOptions(); - private final TestExecutionSummary summary = mock(TestExecutionSummary.class); + private final TestExecutionSummary summary = mock(); @Test void hasStatusCode0ForNoTotalFailures() { diff --git a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherIntegrationTests.java index 3e2241004a83..b8ccb37f3582 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java index 8b1af287fdcc..c22e94e14e8b 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapper.java b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapper.java index 22846b4e9ae0..1740d07912f3 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapper.java +++ b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapperResult.java b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapperResult.java index 539ae4bf8feb..bad59d3f0037 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapperResult.java +++ b/platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherWrapperResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/options/ConsoleUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/console/options/ConsoleUtilsTests.java index 7d5103411f8b..09e807eb902e 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/options/ConsoleUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/options/ConsoleUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/options/PicocliCommandLineOptionsParserTests.java b/platform-tests/src/test/java/org/junit/platform/console/options/PicocliCommandLineOptionsParserTests.java index fc88a9cd28d7..ed793dcf6159 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/options/PicocliCommandLineOptionsParserTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/options/PicocliCommandLineOptionsParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/options/ThemeTests.java b/platform-tests/src/test/java/org/junit/platform/console/options/ThemeTests.java index fb3f50e7e11d..8c96fed4c58d 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/options/ThemeTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/options/ThemeTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTest.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTest.java index 2c8c529b0b0b..b8181cae63d5 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTest.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTests.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTests.java index 5ba1915f7067..410e9d8bd139 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForInnerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTest.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTest.java index 1ed70aaf00ab..8143890bb2d3 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTest.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTests.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTests.java index 2ff762c5cbfb..c13387258398 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ContainerForStaticNestedTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/SecondTest.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/SecondTest.java index 91956de9b0e4..56bccb3ee8bd 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/SecondTest.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/SecondTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/Test.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/Test.java index b57598e9a897..bcecdc12595a 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/Test.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/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/platform-tests/src/test/java/org/junit/platform/console/subpackage/Test1.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/Test1.java index 67532b15a312..d554e0b23d55 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/Test1.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/Test1.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/Tests.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/Tests.java index 5ddb93d4ef27..52142a320f42 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/Tests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/Tests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ThirdTests.java b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ThirdTests.java index 3b2f64094feb..9de75239692c 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/subpackage/ThirdTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/subpackage/ThirdTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/ColorPaletteTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/ColorPaletteTests.java index cb1c8236b476..3a0909c35edb 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/ColorPaletteTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/ColorPaletteTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,7 +22,6 @@ import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.platform.console.options.Theme; -import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestDescriptor; import org.junit.platform.engine.TestExecutionResult; import org.junit.platform.engine.UniqueId; @@ -187,7 +186,7 @@ void flat_single_color() { private void demoTestRun(TestExecutionListener listener) { TestDescriptor testDescriptor = new TestDescriptorStub(UniqueId.forEngine("demo-engine"), "My Test"); - TestPlan testPlan = TestPlan.from(List.of(testDescriptor), mock(ConfigurationParameters.class)); + TestPlan testPlan = TestPlan.from(List.of(testDescriptor), mock()); listener.testPlanExecutionStarted(testPlan); listener.executionStarted(TestIdentifier.from(testDescriptor)); listener.executionFinished(TestIdentifier.from(testDescriptor), TestExecutionResult.successful()); diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/ConsoleTestExecutorTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/ConsoleTestExecutorTests.java index 44136d8a48ec..02c270af9d9c 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/ConsoleTestExecutorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/ConsoleTestExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutorTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutorTests.java index 8f50daf56c3c..ef53d1fe001e 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/CustomContextClassLoaderExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java index f815943a57a1..3456eb8f2068 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/FlatPrintingListenerTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/FlatPrintingListenerTests.java index 274e977ac960..a79bd43f85ae 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/FlatPrintingListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/FlatPrintingListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/TreeNodeTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/TreeNodeTests.java index 91ede1d7be4b..a1256833c2d4 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/TreeNodeTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/TreeNodeTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/TreePrinterTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/TreePrinterTests.java index 018ea4af911d..f7d5982754fc 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/TreePrinterTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/TreePrinterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/console/tasks/VerboseTreeListenerTests.java b/platform-tests/src/test/java/org/junit/platform/console/tasks/VerboseTreeListenerTests.java index aa212b4754e9..2d140433a36a 100644 --- a/platform-tests/src/test/java/org/junit/platform/console/tasks/VerboseTreeListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/console/tasks/VerboseTreeListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/FilterCompositionTests.java b/platform-tests/src/test/java/org/junit/platform/engine/FilterCompositionTests.java index 899db26dd186..422d86df3ea7 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/FilterCompositionTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/FilterCompositionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/TestDescriptorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/TestDescriptorTests.java index 48483a410be8..a98e1ec35af0 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/TestDescriptorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/TestDescriptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/TestTagTests.java b/platform-tests/src/test/java/org/junit/platform/engine/TestTagTests.java index 87c8edb7a1a0..d334b2f9a4a0 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/TestTagTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/TestTagTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdFormatTests.java b/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdFormatTests.java index 552b3b0505ca..6913a7dc289c 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdFormatTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdFormatTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdTests.java b/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdTests.java index b34a72b4a104..9c87d2611314 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/UniqueIdTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassNameFilterTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassNameFilterTests.java index efbed09ad0d0..622f00413342 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassNameFilterTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassNameFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassSelectorTests.java index c1a647583336..6da64efdb35b 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClassSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathResourceSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathResourceSelectorTests.java index e8b26215d5ac..1755982663c3 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathResourceSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathResourceSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathRootSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathRootSelectorTests.java index 061e50d76629..3f23e8aabc91 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathRootSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ClasspathRootSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/DirectorySelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/DirectorySelectorTests.java index d83dc4da9ef1..59f6522bb54a 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/DirectorySelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/DirectorySelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/DiscoverySelectorsTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/DiscoverySelectorsTests.java index fb3f2c754fd9..db65c530b831 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/DiscoverySelectorsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/DiscoverySelectorsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/FilePositionTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/FilePositionTests.java index acfd9538991f..bd5afe94a2c8 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/FilePositionTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/FilePositionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/FileSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/FileSelectorTests.java index c85fedfb8c6b..2d4b47d1d410 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/FileSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/FileSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/MethodSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/MethodSelectorTests.java index 63ff2ebf27ac..4f6b54125ccf 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/MethodSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/MethodSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ModuleSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ModuleSelectorTests.java index 18c24ebc5b60..a637a6c77e4f 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/ModuleSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/ModuleSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedClassSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedClassSelectorTests.java index 59bf7933d3bc..c58b24b52a30 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedClassSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedClassSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedMethodSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedMethodSelectorTests.java index 06bf615d2120..2c547172a95f 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedMethodSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/NestedMethodSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageNameFilterTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageNameFilterTests.java index 6cfee25cfbe8..68c20f76c35f 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageNameFilterTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageNameFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageSelectorTests.java index ba712020b39b..3de77a7b70e0 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/PackageSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/UniqueIdSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/UniqueIdSelectorTests.java index 9c117b176750..13084e5fb2ef 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/UniqueIdSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/UniqueIdSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/discovery/UriSelectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/discovery/UriSelectorTests.java index 9039e95fb739..1405c8e4e6c2 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/discovery/UriSelectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/discovery/UriSelectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/config/PrefixedConfigurationParametersTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/config/PrefixedConfigurationParametersTests.java index 226ba8a8e1f5..5875c3491a69 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/config/PrefixedConfigurationParametersTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/config/PrefixedConfigurationParametersTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptorTests.java index 1057ea8df19e..abbc0f1e9f69 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestDescriptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestSourceTests.java index 7cc4406b58c2..50dc4a1ad938 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/AbstractTestSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClassSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClassSourceTests.java index 25ee76fa05d1..2d5b6eadffa1 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClassSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClassSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSourceTests.java index fc931a9069aa..cb1f75bda45c 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClasspathResourceSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/CompositeTestSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/CompositeTestSourceTests.java index 439c5a0d9eb3..6984fa14718d 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/CompositeTestSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/CompositeTestSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DefaultUriSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DefaultUriSourceTests.java index b9ec159450ca..bb488afb85a9 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DefaultUriSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DefaultUriSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoClassTestDescriptor.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoClassTestDescriptor.java index 57b3ef9aecf1..8531561cd6f2 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoClassTestDescriptor.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoClassTestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoMethodTestDescriptor.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoMethodTestDescriptor.java index e928dc3dca0c..9b73b713b1f8 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoMethodTestDescriptor.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/DemoMethodTestDescriptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FilePositionTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FilePositionTests.java index 77ca484940f1..943184689139 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FilePositionTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FilePositionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FileSystemSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FileSystemSourceTests.java index bdf036f8f025..f89d127acaa5 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FileSystemSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/FileSystemSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/MethodSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/MethodSourceTests.java index f112676af433..44c7f064d692 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/MethodSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/MethodSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/PackageSourceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/PackageSourceTests.java index d084834384a8..b7217e6d9ea4 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/PackageSourceTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/PackageSourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/CompositeLockTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/CompositeLockTests.java index c277c3e88a91..8f1ddee3b755 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/CompositeLockTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/CompositeLockTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategyTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategyTests.java index 309dc9d8d473..b6cb64223aa9 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategyTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/DefaultParallelExecutionConfigurationStrategyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -17,8 +17,6 @@ import static org.mockito.Mockito.when; import java.util.Optional; -import java.util.concurrent.ForkJoinPool; -import java.util.function.Predicate; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -32,7 +30,7 @@ */ class DefaultParallelExecutionConfigurationStrategyTests { - private ConfigurationParameters configParams = mock(ConfigurationParameters.class); + private ConfigurationParameters configParams = mock(); @BeforeEach void setUp() { @@ -51,7 +49,20 @@ void fixedStrategyCreatesValidConfiguration() { assertThat(configuration.getMinimumRunnable()).isEqualTo(42); assertThat(configuration.getMaxPoolSize()).isEqualTo(256 + 42); assertThat(configuration.getKeepAliveSeconds()).isEqualTo(30); - assertThat(configuration.getSaturatePredicate()).isNull(); + assertThat(configuration.getSaturatePredicate().test(null)).isTrue(); + } + + @Test + void fixedSaturateStrategyCreatesValidConfiguration() { + when(configParams.get("fixed.parallelism")).thenReturn(Optional.of("42")); + when(configParams.get("fixed.max-pool-size")).thenReturn(Optional.of("42")); + when(configParams.get("fixed.saturate")).thenReturn(Optional.of("false")); + + ParallelExecutionConfigurationStrategy strategy = DefaultParallelExecutionConfigurationStrategy.FIXED; + var configuration = strategy.createConfiguration(configParams); + assertThat(configuration.getParallelism()).isEqualTo(42); + assertThat(configuration.getMaxPoolSize()).isEqualTo(42); + assertThat(configuration.getSaturatePredicate().test(null)).isFalse(); } @Test @@ -183,12 +194,7 @@ void customStrategyThrowsExceptionWhenClassDoesNotExist() { static class CustomParallelExecutionConfigurationStrategy implements ParallelExecutionConfigurationStrategy { @Override public ParallelExecutionConfiguration createConfiguration(ConfigurationParameters configurationParameters) { - return new DefaultParallelExecutionConfiguration(1, 2, 3, 4, 5) { - @Override - public Predicate getSaturatePredicate() { - return __ -> true; - } - }; + return new DefaultParallelExecutionConfiguration(1, 2, 3, 4, 5, __ -> true); } } diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorServiceTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorServiceTests.java new file mode 100644 index 000000000000..868386f83899 --- /dev/null +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinPoolHierarchicalTestExecutorServiceTests.java @@ -0,0 +1,44 @@ +/* + * Copyright 2015-2023 the original author or 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 + */ + +package org.junit.platform.engine.support.hierarchical; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.Mockito.when; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.junit.platform.commons.JUnitException; +import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; + +@ExtendWith(MockitoExtension.class) +class ForkJoinPoolHierarchicalTestExecutorServiceTests { + + @Mock + ParallelExecutionConfiguration configuration; + + @Test + void exceptionsFromInvalidConfigurationAreNotSwallowed() { + when(configuration.getParallelism()).thenReturn(2); + when(configuration.getMaxPoolSize()).thenReturn(1); // invalid, should be > parallelism + when(configuration.getCorePoolSize()).thenReturn(1); + when(configuration.getMinimumRunnable()).thenReturn(1); + when(configuration.getSaturatePredicate()).thenReturn(__ -> true); + when(configuration.getKeepAliveSeconds()).thenReturn(0); + + JUnitException exception = assertThrows(JUnitException.class, + () -> new ForkJoinPoolHierarchicalTestExecutorService(configuration)); + assertThat(exception).hasMessage("Failed to create ForkJoinPool"); + assertThat(exception).rootCause().isInstanceOf(IllegalArgumentException.class); + } + +} diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorTests.java index 10f0e1511886..80d46102f08e 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/HierarchicalTestExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/LockManagerTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/LockManagerTests.java index 973d3127c3ea..342978f0a62a 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/LockManagerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/LockManagerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/MemoryLeakTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/MemoryLeakTests.java index 441095b22582..ef706b918d95 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/MemoryLeakTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/MemoryLeakTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalkerIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalkerIntegrationTests.java index cb10e1bbe932..e78138018f75 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalkerIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/NodeTreeWalkerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java index b4443e496a0a..ca7433377bf1 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ResourceLockSupport.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ResourceLockSupport.java index 349b5f3fb9be..59f02ffa6e7d 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ResourceLockSupport.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ResourceLockSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SameThreadExecutionIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SameThreadExecutionIntegrationTests.java index 714ea701d7ad..9a17de1a825b 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SameThreadExecutionIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SameThreadExecutionIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleLockTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleLockTests.java index c6966e449daa..382a82fc054d 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleLockTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleLockTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutorTests.java index f745bb4d12d8..2160099a67be 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SingleTestExecutorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ThrowableCollectorTests.java b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ThrowableCollectorTests.java index e8b9b5154516..868e4804f72d 100644 --- a/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ThrowableCollectorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ThrowableCollectorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingDiscoveryListenerIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingDiscoveryListenerIntegrationTests.java index 66816363079a..9dfdc786b147 100644 --- a/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingDiscoveryListenerIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingDiscoveryListenerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingExecutionListenerIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingExecutionListenerIntegrationTests.java index c5f679b8c654..d75732ba8f0b 100644 --- a/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingExecutionListenerIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/jfr/FlightRecordingExecutionListenerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/DiscoveryFilterStub.java b/platform-tests/src/test/java/org/junit/platform/launcher/DiscoveryFilterStub.java index 986346bb80dd..1ca8e6b475b0 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/DiscoveryFilterStub.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/DiscoveryFilterStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/FilterStub.java b/platform-tests/src/test/java/org/junit/platform/launcher/FilterStub.java index 5be517289660..04c7eab08c43 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/FilterStub.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/FilterStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/PostDiscoveryFilterStub.java b/platform-tests/src/test/java/org/junit/platform/launcher/PostDiscoveryFilterStub.java index 997506420635..d16a7bbdd597 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/PostDiscoveryFilterStub.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/PostDiscoveryFilterStub.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/TagFilterTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/TagFilterTests.java index 365480de8bb4..14d966ee9b93 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/TagFilterTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/TagFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/TagIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/TagIntegrationTests.java index dfa99569327f..fd9809c1c558 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/TagIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/TagIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/TestIdentifierTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/TestIdentifierTests.java index 31cab1236a66..8d007f4528ed 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/TestIdentifierTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/TestIdentifierTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherDiscoveryListener.java b/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherDiscoveryListener.java index 413473825a82..489f63caaeb3 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherDiscoveryListener.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherDiscoveryListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherSessionListener.java b/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherSessionListener.java index 25af4a121d65..02a39507d6ac 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherSessionListener.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/TestLauncherSessionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/TestPlanTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/TestPlanTests.java index b73d7426f637..866e085aa438 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/TestPlanTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/TestPlanTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,7 +23,7 @@ class TestPlanTests { - private final ConfigurationParameters configParams = mock(ConfigurationParameters.class); + private final ConfigurationParameters configParams = mock(); private EngineDescriptor engineDescriptor = new EngineDescriptor(UniqueId.forEngine("foo"), "Foo"); diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/TestPostDiscoveryTagFilter.java b/platform-tests/src/test/java/org/junit/platform/launcher/TestPostDiscoveryTagFilter.java index 85957bc761cd..5ba0aada6c64 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/TestPostDiscoveryTagFilter.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/TestPostDiscoveryTagFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeEngineExecutionListenerTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeEngineExecutionListenerTests.java index 4d8e786e44e9..b6ff9bac6307 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeEngineExecutionListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeEngineExecutionListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeTestExecutionListenerTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeTestExecutionListenerTests.java index c1fffe2ef0b7..187513476a77 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeTestExecutionListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/CompositeTestExecutionListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,7 +24,6 @@ import org.junit.jupiter.api.fixtures.TrackLogRecords; import org.junit.platform.commons.logging.LogRecordListener; import org.junit.platform.commons.util.ReflectionUtils; -import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestExecutionResult; import org.junit.platform.engine.UniqueId; import org.junit.platform.engine.reporting.ReportEntry; @@ -92,8 +91,7 @@ void shouldNotThrowExceptionButLogIfTesPlanExecutionStartedListenerMethodFails( LogRecordListener logRecordListener) { var testDescriptor = getDemoMethodTestDescriptor(); - compositeTestExecutionListener().testPlanExecutionStarted( - TestPlan.from(Set.of(testDescriptor), mock(ConfigurationParameters.class))); + compositeTestExecutionListener().testPlanExecutionStarted(TestPlan.from(Set.of(testDescriptor), mock())); assertThatTestListenerErrorLogged(logRecordListener, ThrowingTestExecutionListener.class, "testPlanExecutionStarted"); @@ -104,8 +102,7 @@ void shouldNotThrowExceptionButLogIfTesPlanExecutionFinishedListenerMethodFails( LogRecordListener logRecordListener) { var testDescriptor = getDemoMethodTestDescriptor(); - compositeTestExecutionListener().testPlanExecutionFinished( - TestPlan.from(Set.of(testDescriptor), mock(ConfigurationParameters.class))); + compositeTestExecutionListener().testPlanExecutionFinished(TestPlan.from(Set.of(testDescriptor), mock())); assertThatTestListenerErrorLogged(logRecordListener, ThrowingTestExecutionListener.class, "testPlanExecutionFinished"); diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherEngineFilterTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherEngineFilterTests.java index 8d805b8fcf5e..85732038f6de 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherEngineFilterTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherEngineFilterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -55,8 +55,8 @@ void launcherWillNotExecuteEnginesIfNotIncludedByAnEngineFilter() { assertThat(testPlan.getRoots()).hasSize(1); var rootIdentifier = testPlan.getRoots().iterator().next(); - assertThat(testPlan.getChildren(rootIdentifier.getUniqueId())).hasSize(1); - assertThat(testPlan.getChildren(UniqueId.forEngine("first").toString())).hasSize(1); + assertThat(testPlan.getChildren(rootIdentifier.getUniqueIdObject())).hasSize(1); + assertThat(testPlan.getChildren(UniqueId.forEngine("first"))).hasSize(1); } @Test @@ -118,8 +118,8 @@ void launcherWillNotExecuteEnginesExplicitlyExcludedByAnEngineFilter() { assertThat(testPlan.getRoots()).hasSize(1); var rootIdentifier = testPlan.getRoots().iterator().next(); - assertThat(testPlan.getChildren(rootIdentifier.getUniqueId())).hasSize(1); - assertThat(testPlan.getChildren(UniqueId.forEngine("first").toString())).hasSize(1); + assertThat(testPlan.getChildren(rootIdentifier.getUniqueIdObject())).hasSize(1); + assertThat(testPlan.getChildren(UniqueId.forEngine("first"))).hasSize(1); } @Test @@ -143,8 +143,8 @@ void launcherWillExecuteEnginesHonoringBothIncludeAndExcludeEngineFilters() { assertThat(testPlan.getRoots()).hasSize(1); var rootIdentifier = testPlan.getRoots().iterator().next(); - assertThat(testPlan.getChildren(rootIdentifier.getUniqueId())).hasSize(1); - assertThat(testPlan.getChildren(UniqueId.forEngine("first").toString())).hasSize(1); + assertThat(testPlan.getChildren(rootIdentifier.getUniqueIdObject())).hasSize(1); + assertThat(testPlan.getChildren(UniqueId.forEngine("first"))).hasSize(1); } @Test diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherTests.java index 209e9d945bb1..dce04470cd5c 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -346,8 +346,8 @@ void discoverTestPlanForSingleEngine() { assertThat(testPlan.getRoots()).hasSize(1); var rootIdentifier = testPlan.getRoots().iterator().next(); - assertThat(testPlan.getChildren(rootIdentifier.getUniqueId())).hasSize(2); - assertThat(testPlan.getChildren("[engine:myEngine]")).hasSize(2); + assertThat(testPlan.getChildren(rootIdentifier.getUniqueIdObject())).hasSize(2); + assertThat(testPlan.getChildren(UniqueId.parse("[engine:myEngine]"))).hasSize(2); } @Test @@ -363,8 +363,8 @@ void discoverTestPlanForMultipleEngines() { request().selectors(selectUniqueId(test1.getUniqueId()), selectUniqueId(test2.getUniqueId())).build()); assertThat(testPlan.getRoots()).hasSize(2); - assertThat(testPlan.getChildren(UniqueId.forEngine("engine1").toString())).hasSize(1); - assertThat(testPlan.getChildren(UniqueId.forEngine("engine2").toString())).hasSize(1); + assertThat(testPlan.getChildren(UniqueId.forEngine("engine1"))).hasSize(1); + assertThat(testPlan.getChildren(UniqueId.forEngine("engine2"))).hasSize(1); } @Test @@ -387,8 +387,8 @@ void launcherAppliesPostDiscoveryFilters() { .filters(includeWithUniqueIdContainsTest, includeWithUniqueIdContains1) // .build()); - assertThat(testPlan.getChildren(UniqueId.forEngine("myEngine").toString())).hasSize(1); - assertThat(testPlan.getTestIdentifier(test1.getUniqueId().toString())).isNotNull(); + assertThat(testPlan.getChildren(UniqueId.forEngine("myEngine"))).hasSize(1); + assertThat(testPlan.getTestIdentifier(test1.getUniqueId())).isNotNull(); } @Test @@ -535,12 +535,12 @@ public void execute(ExecutionRequest request) { inOrder.verify(listener).testPlanExecutionStarted(testPlanArgumentCaptor.capture()); var testPlan = testPlanArgumentCaptor.getValue(); - var engineTestIdentifier = testPlan.getTestIdentifier(engineId.toString()); - var containerAndTestIdentifier = testPlan.getTestIdentifier(containerAndTestId.toString()); - var dynamicTestIdentifier = testPlan.getTestIdentifier(dynamicTestId.toString()); - assertThat(engineTestIdentifier.getParentId()).isEmpty(); - assertThat(containerAndTestIdentifier.getParentId()).contains(engineId.toString()); - assertThat(dynamicTestIdentifier.getParentId()).contains(containerAndTestId.toString()); + var engineTestIdentifier = testPlan.getTestIdentifier(engineId); + var containerAndTestIdentifier = testPlan.getTestIdentifier(containerAndTestId); + var dynamicTestIdentifier = testPlan.getTestIdentifier(dynamicTestId); + assertThat(engineTestIdentifier.getParentIdObject()).isEmpty(); + assertThat(containerAndTestIdentifier.getParentIdObject()).contains(engineId); + assertThat(dynamicTestIdentifier.getParentIdObject()).contains(containerAndTestId); inOrder.verify(listener).executionStarted(engineTestIdentifier); inOrder.verify(listener).executionStarted(containerAndTestIdentifier); @@ -579,7 +579,7 @@ void testPlanThrowsExceptionWhenModified() { var launcher = createLauncher(engine); var testPlan = launcher.discover(request().build()); var engineIdentifier = getOnlyElement(testPlan.getRoots()); - var engineUniqueId = UniqueId.parse(engineIdentifier.getUniqueId()); + var engineUniqueId = engineIdentifier.getUniqueIdObject(); assertThat(testPlan.getChildren(engineIdentifier)).hasSize(1); var addedIdentifier = TestIdentifier.from( diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidatorTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidatorTests.java index 243accab2d65..e9421a24871e 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidatorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/EngineDiscoveryResultValidatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/ExecutionListenerAdapterTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/ExecutionListenerAdapterTests.java index b36a8d235974..c120c5c79349 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/ExecutionListenerAdapterTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/ExecutionListenerAdapterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -17,9 +17,7 @@ import org.junit.jupiter.api.Test; import org.junit.platform.commons.util.ReflectionUtils; -import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestDescriptor; -import org.junit.platform.engine.TestEngine; import org.junit.platform.engine.UniqueId; import org.junit.platform.engine.reporting.ReportEntry; import org.junit.platform.engine.support.descriptor.DemoMethodTestDescriptor; @@ -36,10 +34,9 @@ class ExecutionListenerAdapterTests { void testReportingEntryPublished() { var testDescriptor = getSampleMethodTestDescriptor(); - var discoveryResult = new LauncherDiscoveryResult(Map.of(mock(TestEngine.class), testDescriptor), - mock(ConfigurationParameters.class)); + var discoveryResult = new LauncherDiscoveryResult(Map.of(mock(), testDescriptor), mock()); var testPlan = InternalTestPlan.from(discoveryResult); - var testIdentifier = testPlan.getTestIdentifier(testDescriptor.getUniqueId().toString()); + var testIdentifier = testPlan.getTestIdentifier(testDescriptor.getUniqueId()); //not yet spyable with mockito? -> https://github.com/mockito/mockito/issues/146 var testExecutionListener = new MockTestExecutionListener(); diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigTests.java index 0955c89a65fd..63182980a0b5 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigurationParametersTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigurationParametersTests.java index 97ce4573c39e..31154cfa322b 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigurationParametersTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherConfigurationParametersTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilderTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilderTests.java index c45d8e2c9307..f75ee1017fd3 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilderTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherDiscoveryRequestBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherFactoryTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherFactoryTests.java index 70333283e96b..d33d88956201 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherFactoryTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherFactoryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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 org.junit.jupiter.api.Test; import org.junit.jupiter.engine.JupiterTestEngine; import org.junit.platform.commons.PreconditionViolationException; +import org.junit.platform.engine.UniqueId; import org.junit.platform.launcher.LauncherDiscoveryListener; import org.junit.platform.launcher.LauncherDiscoveryRequest; import org.junit.platform.launcher.LauncherSessionListener; @@ -114,10 +115,10 @@ void createWithPostDiscoveryFilters() { .addPostDiscoveryFilters(TagFilter.includeTags("test-post-discovery")).build(); var testPlan = LauncherFactory.create(config).discover(discoveryRequest); - final var vintage = testPlan.getChildren("[engine:junit-vintage]"); + final var vintage = testPlan.getChildren(UniqueId.parse("[engine:junit-vintage]")); assertThat(vintage).isEmpty(); - final var jupiter = testPlan.getChildren("[engine:junit-jupiter]"); + final var jupiter = testPlan.getChildren(UniqueId.parse("[engine:junit-jupiter]")); assertThat(jupiter).hasSize(1); } @@ -135,10 +136,10 @@ void applyPostDiscoveryFiltersViaServiceApi() { .build(); var testPlan = LauncherFactory.create(config).discover(discoveryRequest); - final var vintage = testPlan.getChildren("[engine:junit-vintage]"); + final var vintage = testPlan.getChildren(UniqueId.parse("[engine:junit-vintage]")); assertThat(vintage).isEmpty(); - final var jupiter = testPlan.getChildren("[engine:junit-jupiter]"); + final var jupiter = testPlan.getChildren(UniqueId.parse("[engine:junit-jupiter]")); assertThat(jupiter).hasSize(1); } finally { @@ -160,10 +161,10 @@ void notApplyIfDisabledPostDiscoveryFiltersViaServiceApi() { .enablePostDiscoveryFilterAutoRegistration(false).build(); var testPlan = LauncherFactory.create(config).discover(discoveryRequest); - final var vintage = testPlan.getChildren("[engine:junit-vintage]"); + final var vintage = testPlan.getChildren(UniqueId.parse("[engine:junit-vintage]")); assertThat(vintage).hasSize(1); - final var jupiter = testPlan.getChildren("[engine:junit-jupiter]"); + final var jupiter = testPlan.getChildren(UniqueId.parse("[engine:junit-jupiter]")); assertThat(jupiter).hasSize(1); } finally { diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherSessionTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherSessionTests.java index b74b8ad1fb29..9cc2063d9b9f 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherSessionTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherSessionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/ListenerRegistryTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/ListenerRegistryTests.java index 076a428de099..664076d24abd 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/ListenerRegistryTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/ListenerRegistryTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListenerIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListenerIntegrationTests.java index b4a5b727c30c..cd70637eed3c 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListenerIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptingTestExecutionListenerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -65,7 +65,7 @@ void interceptsStream(String configParam, Supplier printStreamSuppl var listener = mock(TestExecutionListener.class); doAnswer(invocation -> { TestIdentifier testIdentifier = invocation.getArgument(0); - if (testIdentifier.getUniqueId().equals(test.getUniqueId().toString())) { + if (testIdentifier.getUniqueIdObject().equals(test.getUniqueId())) { printStreamSupplier.get().print("123"); } return null; @@ -83,7 +83,7 @@ void interceptsStream(String configParam, Supplier printStreamSuppl var inOrder = inOrder(listener); inOrder.verify(listener).testPlanExecutionStarted(testPlanArgumentCaptor.capture()); var testPlan = testPlanArgumentCaptor.getValue(); - var testIdentifier = testPlan.getTestIdentifier(test.getUniqueId().toString()); + var testIdentifier = testPlan.getTestIdentifier(test.getUniqueId()); var reportEntryArgumentCaptor = ArgumentCaptor.forClass(ReportEntry.class); inOrder.verify(listener).reportingEntryPublished(same(testIdentifier), reportEntryArgumentCaptor.capture()); diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptorTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptorTests.java index 8ed11146236e..c3ba0f96604d 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/AnotherUnusedTestExecutionListener.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/AnotherUnusedTestExecutionListener.java index 89d4a42c3f0f..c3d6cfaccd8a 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/AnotherUnusedTestExecutionListener.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/AnotherUnusedTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/NoopTestExecutionListener.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/NoopTestExecutionListener.java index 14438f62c8ca..d471e6e745c2 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/NoopTestExecutionListener.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/NoopTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/OutputDirTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/OutputDirTests.java index 8700f9ed2efa..a876c5bf4d2f 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/OutputDirTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/OutputDirTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/SummaryGenerationTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/SummaryGenerationTests.java index 4671332bcf34..7c947bf1d8d7 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/SummaryGenerationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/SummaryGenerationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -25,7 +25,6 @@ import org.junit.jupiter.api.RepeatedTest; import org.junit.jupiter.api.Test; -import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestExecutionResult; import org.junit.platform.engine.TestSource; import org.junit.platform.engine.UniqueId; @@ -40,7 +39,7 @@ class SummaryGenerationTests { private final SummaryGeneratingListener listener = new SummaryGeneratingListener(); - private final TestPlan testPlan = TestPlan.from(List.of(), mock(ConfigurationParameters.class)); + private final TestPlan testPlan = TestPlan.from(List.of(), mock()); @Test void emptyReport() { diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListenerIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListenerIntegrationTests.java index 56535d77bee0..86943a9cc093 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListenerIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListenerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UnusedTestExecutionListener.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UnusedTestExecutionListener.java index 933b915987f5..cbf7e6f9bea9 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UnusedTestExecutionListener.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/UnusedTestExecutionListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListenerTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListenerTests.java index f5d6bf59ec8a..0ee89659d92a 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbortOnFailureLauncherDiscoveryListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbstractLauncherDiscoveryListenerTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbstractLauncherDiscoveryListenerTests.java index c5467c549d9c..1666f66f48d4 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbstractLauncherDiscoveryListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/AbstractLauncherDiscoveryListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListenerTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListenerTests.java index ed52d557b252..4cdecfa28760 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserErrorTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserErrorTests.java index a686fe959924..3691dce22f1a 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserErrorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserErrorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserTests.java index 24f887cf957e..4b15ba0fb46e 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/ParserTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TagExpressionsTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TagExpressionsTests.java index 82e81aef34dc..852ed6af2f69 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TagExpressionsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TagExpressionsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenTests.java index 4fee75a93057..387d2986aafa 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenizerTests.java b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenizerTests.java index 319440c3fa4f..94aa30442a61 100644 --- a/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenizerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/launcher/tagexpression/TokenizerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/LegacyReportingUtilsTests.java b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/LegacyReportingUtilsTests.java index cc329d465e5b..2cf36b309f4a 100644 --- a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/LegacyReportingUtilsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/LegacyReportingUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -16,7 +16,6 @@ import java.util.Set; import org.junit.jupiter.api.Test; -import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestDescriptor; import org.junit.platform.engine.TestSource; import org.junit.platform.engine.UniqueId; @@ -72,15 +71,15 @@ void legacyReportingClassNameForDescendantOfTestIdentifierWithClassSourceIsClass } private String getClassName(UniqueId uniqueId) { - var testPlan = TestPlan.from(Set.of(engineDescriptor), mock(ConfigurationParameters.class)); - return LegacyReportingUtils.getClassName(testPlan, testPlan.getTestIdentifier(uniqueId.toString())); + var testPlan = TestPlan.from(Set.of(engineDescriptor), mock()); + return LegacyReportingUtils.getClassName(testPlan, testPlan.getTestIdentifier(uniqueId)); } @SuppressWarnings("deprecation") private String getClassNameFromOldLocation(UniqueId uniqueId) { - var testPlan = TestPlan.from(Set.of(engineDescriptor), mock(ConfigurationParameters.class)); + var testPlan = TestPlan.from(Set.of(engineDescriptor), mock()); return org.junit.platform.launcher.listeners.LegacyReportingUtils.getClassName(testPlan, - testPlan.getTestIdentifier(uniqueId.toString())); + testPlan.getTestIdentifier(uniqueId)); } private TestDescriptor createTestDescriptor(UniqueId uniqueId, String displayName, TestSource source) { diff --git a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/IncrementingClock.java b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/IncrementingClock.java index 8f10736e40e8..d46dad4a88a3 100644 --- a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/IncrementingClock.java +++ b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/IncrementingClock.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListenerTests.java b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListenerTests.java index 3927e44c6b57..1ae505f8ba54 100644 --- a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -42,7 +42,6 @@ import org.joox.Match; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; -import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestEngine; import org.junit.platform.engine.UniqueId; import org.junit.platform.engine.reporting.ReportEntry; @@ -370,7 +369,7 @@ void printsExceptionWhenReportsDirCannotBeCreated() throws Exception { var out = new StringWriter(); var listener = new LegacyXmlReportGeneratingListener(reportsDir, new PrintWriter(out)); - listener.testPlanExecutionStarted(TestPlan.from(Set.of(), mock(ConfigurationParameters.class))); + listener.testPlanExecutionStarted(TestPlan.from(Set.of(), mock())); assertThat(out.toString()).containsSubsequence("Could not create reports directory", "FileAlreadyExistsException", "at "); @@ -386,7 +385,7 @@ void printsExceptionWhenReportCouldNotBeWritten() throws Exception { var out = new StringWriter(); var listener = new LegacyXmlReportGeneratingListener(tempDirectory, new PrintWriter(out)); - listener.testPlanExecutionStarted(TestPlan.from(Set.of(engineDescriptor), mock(ConfigurationParameters.class))); + listener.testPlanExecutionStarted(TestPlan.from(Set.of(engineDescriptor), mock())); listener.executionFinished(TestIdentifier.from(engineDescriptor), successful()); assertThat(out.toString()).containsSubsequence("Could not write XML report", "Exception", "at "); @@ -395,14 +394,15 @@ void printsExceptionWhenReportCouldNotBeWritten() throws Exception { @Test void writesReportEntriesToSystemOutElement() throws Exception { var engineDescriptor = new EngineDescriptor(UniqueId.forEngine("engine"), "Engine"); - engineDescriptor.addChild(new TestDescriptorStub(UniqueId.root("child", "test"), "test")); - var testPlan = TestPlan.from(Set.of(engineDescriptor), mock(ConfigurationParameters.class)); + var childUniqueId = UniqueId.root("child", "test"); + engineDescriptor.addChild(new TestDescriptorStub(childUniqueId, "test")); + var testPlan = TestPlan.from(Set.of(engineDescriptor), mock()); var out = new StringWriter(); var listener = new LegacyXmlReportGeneratingListener(tempDirectory, new PrintWriter(out)); listener.testPlanExecutionStarted(testPlan); - var testIdentifier = testPlan.getTestIdentifier("[child:test]"); + var testIdentifier = testPlan.getTestIdentifier(childUniqueId); listener.executionStarted(testIdentifier); listener.reportingEntryPublished(testIdentifier, ReportEntry.from("foo", "bar")); Map map = new LinkedHashMap<>(); @@ -410,7 +410,7 @@ void writesReportEntriesToSystemOutElement() throws Exception { map.put("qux", "foo"); listener.reportingEntryPublished(testIdentifier, ReportEntry.from(map)); listener.executionFinished(testIdentifier, successful()); - listener.executionFinished(testPlan.getTestIdentifier("[engine:engine]"), successful()); + listener.executionFinished(testPlan.getTestIdentifier(engineDescriptor.getUniqueId()), successful()); var testsuite = readValidXmlFile(tempDirectory.resolve("TEST-engine.xml")); diff --git a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportAssertions.java b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportAssertions.java index 4534538e442c..22b3d7d08a4b 100644 --- a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportAssertions.java +++ b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportAssertions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportDataTests.java b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportDataTests.java index 8eb7598a581e..fb88bc9f872b 100644 --- a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportDataTests.java +++ b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportDataTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,16 +30,17 @@ */ class XmlReportDataTests { - private final ConfigurationParameters configParams = mock(ConfigurationParameters.class); + private final ConfigurationParameters configParams = mock(); @Test void resultsOfTestIdentifierWithoutAnyReportedEventsAreEmpty() { var engineDescriptor = new EngineDescriptor(UniqueId.forEngine("engine"), "Engine"); - engineDescriptor.addChild(new TestDescriptorStub(UniqueId.root("child", "test"), "test")); + var childUniqueId = UniqueId.root("child", "test"); + engineDescriptor.addChild(new TestDescriptorStub(childUniqueId, "test")); var testPlan = TestPlan.from(Set.of(engineDescriptor), configParams); var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); - var results = reportData.getResults(testPlan.getTestIdentifier("[child:test]")); + var results = reportData.getResults(testPlan.getTestIdentifier(childUniqueId)); assertThat(results).isEmpty(); } @@ -47,14 +48,15 @@ void resultsOfTestIdentifierWithoutAnyReportedEventsAreEmpty() { @Test void resultsOfTestIdentifierWithoutReportedEventsContainsOnlyFailureOfAncestor() { var engineDescriptor = new EngineDescriptor(UniqueId.forEngine("engine"), "Engine"); - engineDescriptor.addChild(new TestDescriptorStub(UniqueId.root("child", "test"), "test")); + var childUniqueId = UniqueId.root("child", "test"); + engineDescriptor.addChild(new TestDescriptorStub(childUniqueId, "test")); var testPlan = TestPlan.from(Set.of(engineDescriptor), configParams); var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); var failureOfAncestor = failed(new RuntimeException("failed!")); - reportData.markFinished(testPlan.getTestIdentifier("[engine:engine]"), failureOfAncestor); + reportData.markFinished(testPlan.getTestIdentifier(engineDescriptor.getUniqueId()), failureOfAncestor); - var results = reportData.getResults(testPlan.getTestIdentifier("[child:test]")); + var results = reportData.getResults(testPlan.getTestIdentifier(childUniqueId)); assertThat(results).containsExactly(failureOfAncestor); } @@ -62,13 +64,14 @@ void resultsOfTestIdentifierWithoutReportedEventsContainsOnlyFailureOfAncestor() @Test void resultsOfTestIdentifierWithoutReportedEventsContainsOnlySuccessOfAncestor() { var engineDescriptor = new EngineDescriptor(UniqueId.forEngine("engine"), "Engine"); - engineDescriptor.addChild(new TestDescriptorStub(UniqueId.root("child", "test"), "test")); + var childUniqueId = UniqueId.root("child", "test"); + engineDescriptor.addChild(new TestDescriptorStub(childUniqueId, "test")); var testPlan = TestPlan.from(Set.of(engineDescriptor), configParams); var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); - reportData.markFinished(testPlan.getTestIdentifier("[engine:engine]"), successful()); + reportData.markFinished(testPlan.getTestIdentifier(engineDescriptor.getUniqueId()), successful()); - var results = reportData.getResults(testPlan.getTestIdentifier("[child:test]")); + var results = reportData.getResults(testPlan.getTestIdentifier(childUniqueId)); assertThat(results).containsExactly(successful()); } diff --git a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportWriterTests.java b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportWriterTests.java index 4fb44c5f653d..8487afb1bceb 100644 --- a/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportWriterTests.java +++ b/platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/XmlReportWriterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -48,7 +48,7 @@ */ class XmlReportWriterTests { - private final ConfigurationParameters configParams = mock(ConfigurationParameters.class); + private final ConfigurationParameters configParams = mock(); private EngineDescriptor engineDescriptor = new EngineDescriptor(UniqueId.forEngine("engine"), "Engine"); @@ -76,7 +76,7 @@ void writesReportEntry() throws Exception { var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); reportData.addReportEntry(TestIdentifier.from(testDescriptor), ReportEntry.from("myKey", "myValue")); - reportData.markFinished(testPlan.getTestIdentifier(uniqueId.toString()), successful()); + reportData.markFinished(testPlan.getTestIdentifier(uniqueId), successful()); var testsuite = writeXmlReport(testPlan, reportData); @@ -99,7 +99,7 @@ void writesCapturedOutput() throws Exception { "foo", "bar")); reportData.addReportEntry(TestIdentifier.from(testDescriptor), reportEntry); reportData.addReportEntry(TestIdentifier.from(testDescriptor), ReportEntry.from(Map.of("baz", "qux"))); - reportData.markFinished(testPlan.getTestIdentifier(uniqueId.toString()), successful()); + reportData.markFinished(testPlan.getTestIdentifier(uniqueId), successful()); var testsuite = writeXmlReport(testPlan, reportData); @@ -122,7 +122,7 @@ void writesEmptySkippedElementForSkippedTestWithoutReason() throws Exception { var testPlan = TestPlan.from(Set.of(engineDescriptor), configParams); var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); - reportData.markSkipped(testPlan.getTestIdentifier(uniqueId.toString()), null); + reportData.markSkipped(testPlan.getTestIdentifier(uniqueId), null); var testsuite = writeXmlReport(testPlan, reportData); @@ -152,7 +152,7 @@ public String getLegacyReportingName() { var testPlan = TestPlan.from(Set.of(engineDescriptor), configParams); var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); - reportData.markFinished(testPlan.getTestIdentifier(uniqueId.toString()), failed(null)); + reportData.markFinished(testPlan.getTestIdentifier(uniqueId), failed(null)); var testsuite = writeXmlReport(testPlan, reportData); @@ -172,7 +172,7 @@ void omitsMessageAttributeForFailedTestWithThrowableWithoutMessage() throws Exce var testPlan = TestPlan.from(Set.of(engineDescriptor), configParams); var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); - reportData.markFinished(testPlan.getTestIdentifier(uniqueId.toString()), failed(new NullPointerException())); + reportData.markFinished(testPlan.getTestIdentifier(uniqueId), failed(new NullPointerException())); var testsuite = writeXmlReport(testPlan, reportData); @@ -190,7 +190,7 @@ void writesValidXmlEvenIfExceptionMessageContainsCData() throws Exception { var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); var assertionError = new AssertionError(""); - reportData.markFinished(testPlan.getTestIdentifier(uniqueId.toString()), failed(assertionError)); + reportData.markFinished(testPlan.getTestIdentifier(uniqueId), failed(assertionError)); var testsuite = writeXmlReport(testPlan, reportData); @@ -206,7 +206,7 @@ void escapesInvalidCharactersInSystemPropertiesAndExceptionMessages() throws Exc var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); var assertionError = new AssertionError("expected: but was: "); - reportData.markFinished(testPlan.getTestIdentifier(uniqueId.toString()), failed(assertionError)); + reportData.markFinished(testPlan.getTestIdentifier(uniqueId), failed(assertionError)); System.setProperty("foo.bar", "\1"); Match testsuite; @@ -235,7 +235,7 @@ void doesNotReopenCDataWithinCDataContent() throws Exception { var reportData = new XmlReportData(testPlan, Clock.systemDefaultZone()); var assertionError = new AssertionError(""); - reportData.markFinished(testPlan.getTestIdentifier(uniqueId.toString()), failed(assertionError)); + reportData.markFinished(testPlan.getTestIdentifier(uniqueId), failed(assertionError)); Writer assertingWriter = new StringWriter() { @SuppressWarnings("NullableProblems") diff --git a/platform-tests/src/test/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListenerTests.java b/platform-tests/src/test/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListenerTests.java index 7287f168064d..99398dbc31e8 100644 --- a/platform-tests/src/test/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListenerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListenerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/runner/JUnitPlatformRunnerTests.java b/platform-tests/src/test/java/org/junit/platform/runner/JUnitPlatformRunnerTests.java index 8c2921607f9b..a515e6dd2990 100644 --- a/platform-tests/src/test/java/org/junit/platform/runner/JUnitPlatformRunnerTests.java +++ b/platform-tests/src/test/java/org/junit/platform/runner/JUnitPlatformRunnerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -465,7 +465,7 @@ void convertsTestIdentifiersIntoDescriptions() { TestDescriptor container2 = new TestDescriptorStub(UniqueId.root("root", "container2"), "container2"); container2.addChild(new TestDescriptorStub(UniqueId.root("root", "test2a"), "test2a")); container2.addChild(new TestDescriptorStub(UniqueId.root("root", "test2b"), "test2b")); - var testPlan = TestPlan.from(List.of(container1, container2), mock(ConfigurationParameters.class)); + var testPlan = TestPlan.from(List.of(container1, container2), mock()); var launcher = mock(Launcher.class); when(launcher.discover(any())).thenReturn(testPlan); @@ -502,7 +502,7 @@ private static void assertExcludes(Filter filter, T excluded) { @Nested class Filtering { - private final ConfigurationParameters configParams = mock(ConfigurationParameters.class); + private final ConfigurationParameters configParams = mock(); @Test void appliesFilter() throws Exception { @@ -760,11 +760,11 @@ void failingTest() { // ------------------------------------------------------------------------- private static Description suiteDescription(String uniqueId) { - return createSuiteDescription(uniqueId, uniqueId); + return createSuiteDescription(uniqueId, UniqueId.parse(uniqueId)); } private static Description testDescription(String uniqueId) { - return createTestDescription(uniqueId, uniqueId, uniqueId); + return createTestDescription(uniqueId, uniqueId, UniqueId.parse(uniqueId)); } private TestDescriptor testDescriptorWithTags(String... tag) { @@ -777,8 +777,7 @@ private TestDescriptor testDescriptorWithTags(String... tag) { private LauncherDiscoveryRequest instantiateRunnerAndCaptureGeneratedRequest(Class testClass) { var launcher = mock(Launcher.class); var captor = ArgumentCaptor.forClass(LauncherDiscoveryRequest.class); - when(launcher.discover(captor.capture())).thenReturn( - TestPlan.from(Set.of(), mock(ConfigurationParameters.class))); + when(launcher.discover(captor.capture())).thenReturn(TestPlan.from(Set.of(), mock())); new JUnitPlatform(testClass, launcher); diff --git a/platform-tests/src/test/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilderTests.java b/platform-tests/src/test/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilderTests.java index 3d10535e8956..7a985b601ee1 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilderTests.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/commons/SuiteLauncherDiscoveryRequestBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteEngineTests.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteEngineTests.java index e0b7862fb22b..4c44d1c04e3f 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteEngineTests.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteEngineTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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.platform.testkit.engine.EventConditions.finishedWithFailure; import static org.junit.platform.testkit.engine.EventConditions.test; import static org.junit.platform.testkit.engine.TestExecutionResultConditions.instanceOf; +import static org.junit.platform.testkit.engine.TestExecutionResultConditions.message; import org.junit.jupiter.api.Test; import org.junit.jupiter.engine.descriptor.ClassTestDescriptor; @@ -39,7 +40,9 @@ import org.junit.platform.suite.engine.testcases.SingleTestTestCase; import org.junit.platform.suite.engine.testcases.TaggedTestTestCase; import org.junit.platform.suite.engine.testsuites.AbstractSuite; +import org.junit.platform.suite.engine.testsuites.CyclicSuite; import org.junit.platform.suite.engine.testsuites.DynamicSuite; +import org.junit.platform.suite.engine.testsuites.EmptyCyclicSuite; import org.junit.platform.suite.engine.testsuites.EmptyDynamicTestSuite; import org.junit.platform.suite.engine.testsuites.EmptyDynamicTestWithFailIfNoTestFalseSuite; import org.junit.platform.suite.engine.testsuites.EmptyTestCaseSuite; @@ -50,6 +53,7 @@ import org.junit.platform.suite.engine.testsuites.SelectClassesSuite; import org.junit.platform.suite.engine.testsuites.SuiteDisplayNameSuite; import org.junit.platform.suite.engine.testsuites.SuiteSuite; +import org.junit.platform.suite.engine.testsuites.ThreePartCyclicSuite; import org.junit.platform.testkit.engine.EngineTestKit; /** @@ -350,4 +354,42 @@ void pruneAfterPostDiscoveryFilters() { // @formatter:on } + @Test + void cyclicSuite() { + // @formatter:off + EngineTestKit.engine(ENGINE_ID) + .selectors(selectClass(CyclicSuite.class)) + .execute() + .allEvents() + .assertThatEvents() + .haveExactly(1, event(test(SingleTestTestCase.class.getName()), finishedSuccessfully())); + // @formatter:on + } + + @Test + void emptyCyclicSuite() { + // @formatter:off + EngineTestKit.engine(ENGINE_ID) + .selectors(selectClass(EmptyCyclicSuite.class)) + .execute() + .allEvents() + .assertThatEvents() + .haveExactly(1, event(container(EmptyCyclicSuite.class), finishedWithFailure(message( + "Suite [org.junit.platform.suite.engine.testsuites.EmptyCyclicSuite] did not discover any tests" + )))); + // @formatter:on + } + + @Test + void threePartCyclicSuite() { + // @formatter:off + EngineTestKit.engine(ENGINE_ID) + .selectors(selectClass(ThreePartCyclicSuite.PartA.class)) + .execute() + .allEvents() + .assertThatEvents() + .haveExactly(1, event(test(SingleTestTestCase.class.getName()), finishedSuccessfully())); + // @formatter:on + } + } diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteTestDescriptorTests.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteTestDescriptorTests.java index b0ce53036796..627de28d8de6 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteTestDescriptorTests.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/SuiteTestDescriptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -25,14 +25,12 @@ import org.junit.jupiter.engine.descriptor.ClassTestDescriptor; import org.junit.jupiter.engine.descriptor.JupiterEngineDescriptor; import org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor; -import org.junit.platform.commons.JUnitException; import org.junit.platform.commons.PreconditionViolationException; import org.junit.platform.engine.ConfigurationParameters; import org.junit.platform.engine.TestDescriptor; import org.junit.platform.engine.UniqueId; import org.junit.platform.suite.api.Suite; import org.junit.platform.suite.engine.testcases.SingleTestTestCase; -import org.junit.platform.suite.engine.testsuites.CyclicSuite; import org.junit.platform.suite.engine.testsuites.SelectClassesSuite; /** @@ -90,21 +88,6 @@ void discoveryPlanCanNotBeModifiedAfterDiscovery() { }); } - @Test - void suitesMayNotContainACycle() { - // @formatter:off - UniqueId expectedCycle = suiteId - .append("engine", SuiteEngineDescriptor.ENGINE_ID) - .append(SuiteTestDescriptor.SEGMENT_TYPE, CyclicSuite.class.getName()) - .append("engine", SuiteEngineDescriptor.ENGINE_ID) - .append(SuiteTestDescriptor.SEGMENT_TYPE, CyclicSuite.class.getName()); - // @formatter:on - suite.addDiscoveryRequestFrom(CyclicSuite.class); - JUnitException exception = assertThrows(JUnitException.class, suite::discover); - assertEquals("Configuration error: The suite configuration may not contain a cycle [" + expectedCycle + "]", - exception.getCause().getCause().getCause().getMessage()); - } - @Test void suiteMayRegisterTests() { assertTrue(suite.mayRegisterTests()); diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/DynamicTestsTestCase.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/DynamicTestsTestCase.java index 6d857c2f20df..7972eee2d96f 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/DynamicTestsTestCase.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/DynamicTestsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyDynamicTestsTestCase.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyDynamicTestsTestCase.java index f3c77b7b6ee3..be17ec51e4f0 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyDynamicTestsTestCase.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyDynamicTestsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyTestTestCase.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyTestTestCase.java index ec5f1290eeea..1251644af9ca 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyTestTestCase.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/EmptyTestTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/JUnit4TestsTestCase.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/JUnit4TestsTestCase.java index 7ac88ca12567..208d48bb30a5 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/JUnit4TestsTestCase.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/JUnit4TestsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/MultipleTestsTestCase.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/MultipleTestsTestCase.java index a25db296e23e..41ddbbbb4c63 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/MultipleTestsTestCase.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/MultipleTestsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/SingleTestTestCase.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/SingleTestTestCase.java index 561b28ae0f15..bb6116ebd210 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/SingleTestTestCase.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/SingleTestTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/TaggedTestTestCase.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/TaggedTestTestCase.java index 44813086481e..0ecc4d9c347f 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/TaggedTestTestCase.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testcases/TaggedTestTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/AbstractSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/AbstractSuite.java index e544f0c4edc7..c648e904fba7 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/AbstractSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/AbstractSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/CyclicSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/CyclicSuite.java index 1897e743fec6..df2636d58b84 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/CyclicSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/CyclicSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or 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,12 +13,13 @@ import org.junit.platform.suite.api.IncludeClassNamePatterns; import org.junit.platform.suite.api.SelectClasses; import org.junit.platform.suite.api.Suite; +import org.junit.platform.suite.engine.testcases.SingleTestTestCase; /** * @since 1.8 */ @Suite @IncludeClassNamePatterns(".*") -@SelectClasses(CyclicSuite.class) +@SelectClasses({ CyclicSuite.class, SingleTestTestCase.class }) public class CyclicSuite { } diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/DynamicSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/DynamicSuite.java index d75f0f5c5ea3..525498e44714 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/DynamicSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/DynamicSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyCyclicSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyCyclicSuite.java new file mode 100644 index 000000000000..38554f36eedf --- /dev/null +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyCyclicSuite.java @@ -0,0 +1,24 @@ +/* + * Copyright 2015-2023 the original author or 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 + */ + +package org.junit.platform.suite.engine.testsuites; + +import org.junit.platform.suite.api.IncludeClassNamePatterns; +import org.junit.platform.suite.api.SelectClasses; +import org.junit.platform.suite.api.Suite; + +/** + * @since 1.9.2 + */ +@Suite +@IncludeClassNamePatterns(".*") +@SelectClasses(EmptyCyclicSuite.class) +public class EmptyCyclicSuite { +} diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestSuite.java index ecb4873f71e2..b57904850597 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestWithFailIfNoTestFalseSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestWithFailIfNoTestFalseSuite.java index bfec545c56c6..d1f87c65d968 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestWithFailIfNoTestFalseSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyDynamicTestWithFailIfNoTestFalseSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseSuite.java index 1d80d8881b43..55b72d396344 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseWithFailIfNoTestFalseSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseWithFailIfNoTestFalseSuite.java index 44e3896b2ca8..f1d5bf564409 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseWithFailIfNoTestFalseSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/EmptyTestCaseWithFailIfNoTestFalseSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultiEngineSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultiEngineSuite.java index 656e08f273ce..ac12777b88fa 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultiEngineSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultiEngineSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultipleSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultipleSuite.java index 48676d211aff..c05368ddf20e 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultipleSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/MultipleSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/NestedSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/NestedSuite.java index f131dcbd377b..7d07a8661f27 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/NestedSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/NestedSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SelectClassesSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SelectClassesSuite.java index c0c7b455df3b..1d9df39efbaf 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SelectClassesSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SelectClassesSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteDisplayNameSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteDisplayNameSuite.java index 920b871d22e3..436e822d9c9a 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteDisplayNameSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteDisplayNameSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteSuite.java index 027a30018608..205c71c8fce3 100644 --- a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteSuite.java +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/SuiteSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/ThreePartCyclicSuite.java b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/ThreePartCyclicSuite.java new file mode 100644 index 000000000000..febbba584991 --- /dev/null +++ b/platform-tests/src/test/java/org/junit/platform/suite/engine/testsuites/ThreePartCyclicSuite.java @@ -0,0 +1,43 @@ +/* + * Copyright 2015-2023 the original author or 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 + */ + +package org.junit.platform.suite.engine.testsuites; + +import org.junit.platform.suite.api.IncludeClassNamePatterns; +import org.junit.platform.suite.api.SelectClasses; +import org.junit.platform.suite.api.Suite; +import org.junit.platform.suite.engine.testcases.SingleTestTestCase; + +/** + * @since 1.9.2 + */ +public class ThreePartCyclicSuite { + + @Suite + @IncludeClassNamePatterns(".*") + @SelectClasses({ PartB.class }) + public static class PartA { + + } + + @Suite + @IncludeClassNamePatterns(".*") + @SelectClasses({ PartC.class }) + public static class PartB { + + } + + @Suite + @IncludeClassNamePatterns(".*") + @SelectClasses({ PartB.class, SingleTestTestCase.class }) + public static class PartC { + + } +} diff --git a/platform-tests/src/test/java/org/junit/platform/testkit/engine/EngineTestKitTests.java b/platform-tests/src/test/java/org/junit/platform/testkit/engine/EngineTestKitTests.java index c6ac6e49a239..61c18d5e773c 100644 --- a/platform-tests/src/test/java/org/junit/platform/testkit/engine/EngineTestKitTests.java +++ b/platform-tests/src/test/java/org/junit/platform/testkit/engine/EngineTestKitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/testkit/engine/EventsTests.java b/platform-tests/src/test/java/org/junit/platform/testkit/engine/EventsTests.java index b5f4dec98f0f..aeda1baadbf9 100644 --- a/platform-tests/src/test/java/org/junit/platform/testkit/engine/EventsTests.java +++ b/platform-tests/src/test/java/org/junit/platform/testkit/engine/EventsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java b/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java index fcbda4ce96d0..ea609b601039 100644 --- a/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java +++ b/platform-tests/src/test/java/org/junit/platform/testkit/engine/ExecutionsIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tests/src/test/java/org/junit/platform/testkit/engine/NestedContainerEventConditionTests.java b/platform-tests/src/test/java/org/junit/platform/testkit/engine/NestedContainerEventConditionTests.java index a8571bfef83a..c16b2e264459 100644 --- a/platform-tests/src/test/java/org/junit/platform/testkit/engine/NestedContainerEventConditionTests.java +++ b/platform-tests/src/test/java/org/junit/platform/testkit/engine/NestedContainerEventConditionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts b/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts index 8a27b7b936b0..f594af846257 100644 --- a/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts +++ b/platform-tooling-support-tests/platform-tooling-support-tests.gradle.kts @@ -2,7 +2,7 @@ import org.gradle.api.tasks.PathSensitivity.RELATIVE import org.gradle.jvm.toolchain.internal.NoToolchainAvailableException plugins { - `java-library-conventions` + `kotlin-library-conventions` `testing-conventions` } @@ -10,6 +10,20 @@ javaLibrary { mainJavaVersion = JavaVersion.VERSION_11 } +spotless { + java { + target(files(project.java.sourceSets.map { it.allJava }), "projects/**/*.java") + } + kotlin { + target("projects/**/*.kt") + } + format("projects") { + target("projects/**/*.gradle.kts", "projects/**/*.md") + trimTrailingWhitespace() + endWithNewline() + } +} + val thirdPartyJars by configurations.creating val antJars by configurations.creating val mavenDistribution by configurations.creating @@ -63,7 +77,7 @@ dependencies { } } -val unzipMavenDistribution by tasks.registering(Copy::class) { +val unzipMavenDistribution by tasks.registering(Sync::class) { from(zipTree(mavenDistribution.elements.map { it.single() })) into(layout.buildDirectory.dir("maven-distribution")) } @@ -128,7 +142,7 @@ class JavaHomeDir(project: Project, @Input val version: Int) : CommandLineArgume val javaLauncher: Property = project.objects.property() .value(project.provider { try { - project.the().launcherFor { + project.javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(version)) }.get() } catch (e: NoToolchainAvailableException) { diff --git a/platform-tooling-support-tests/projects/ant-starter/src/main/java/com/example/project/Calculator.java b/platform-tooling-support-tests/projects/ant-starter/src/main/java/com/example/project/Calculator.java index 91436757229c..6feca6bfc04b 100644 --- a/platform-tooling-support-tests/projects/ant-starter/src/main/java/com/example/project/Calculator.java +++ b/platform-tooling-support-tests/projects/ant-starter/src/main/java/com/example/project/Calculator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/projects/ant-starter/src/test/java/com/example/project/CalculatorTests.java b/platform-tooling-support-tests/projects/ant-starter/src/test/java/com/example/project/CalculatorTests.java index b0dfc0524564..695282baccc8 100644 --- a/platform-tooling-support-tests/projects/ant-starter/src/test/java/com/example/project/CalculatorTests.java +++ b/platform-tooling-support-tests/projects/ant-starter/src/test/java/com/example/project/CalculatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -27,15 +27,15 @@ void addsTwoNumbers() { } @ParameterizedTest(name = "{0} + {1} = {2}") - @CsvSource({ - "0, 1, 1", - "1, 2, 3", - "49, 51, 100", - "1, 100, 101" + @CsvSource({ // + "0, 1, 1", // + "1, 2, 3", // + "49, 51, 100", // + "1, 100, 101" // }) void add(int first, int second, int expectedResult) { Calculator calculator = new Calculator(); assertEquals(expectedResult, calculator.add(first, second), - () -> first + " + " + second + " should equal " + expectedResult); + () -> first + " + " + second + " should equal " + expectedResult); } } diff --git a/platform-tooling-support-tests/projects/graalvm-starter/src/main/java/com/example/project/Calculator.java b/platform-tooling-support-tests/projects/graalvm-starter/src/main/java/com/example/project/Calculator.java index b90710f2c68d..6feca6bfc04b 100644 --- a/platform-tooling-support-tests/projects/graalvm-starter/src/main/java/com/example/project/Calculator.java +++ b/platform-tooling-support-tests/projects/graalvm-starter/src/main/java/com/example/project/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/platform-tooling-support-tests/projects/graalvm-starter/src/test/java/com/example/project/CalculatorTests.java b/platform-tooling-support-tests/projects/graalvm-starter/src/test/java/com/example/project/CalculatorTests.java index 7f043f0dd3ea..695282baccc8 100644 --- a/platform-tooling-support-tests/projects/graalvm-starter/src/test/java/com/example/project/CalculatorTests.java +++ b/platform-tooling-support-tests/projects/graalvm-starter/src/test/java/com/example/project/CalculatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -27,15 +27,15 @@ void addsTwoNumbers() { } @ParameterizedTest(name = "{0} + {1} = {2}") - @CsvSource({ - "0, 1, 1", - "1, 2, 3", - "49, 51, 100", - "1, 100, 101" + @CsvSource({ // + "0, 1, 1", // + "1, 2, 3", // + "49, 51, 100", // + "1, 100, 101" // }) void add(int first, int second, int expectedResult) { Calculator calculator = new Calculator(); assertEquals(expectedResult, calculator.add(first, second), - () -> first + " + " + second + " should equal " + expectedResult); + () -> first + " + " + second + " should equal " + expectedResult); } } diff --git a/platform-tooling-support-tests/projects/gradle-kotlin-extensions/src/test/kotlin/com/example/project/ExtensionFunctionsTests.kt b/platform-tooling-support-tests/projects/gradle-kotlin-extensions/src/test/kotlin/com/example/project/ExtensionFunctionsTests.kt index b74c92e28f70..0de75b1f9116 100644 --- a/platform-tooling-support-tests/projects/gradle-kotlin-extensions/src/test/kotlin/com/example/project/ExtensionFunctionsTests.kt +++ b/platform-tooling-support-tests/projects/gradle-kotlin-extensions/src/test/kotlin/com/example/project/ExtensionFunctionsTests.kt @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -7,7 +7,6 @@ * * https://www.eclipse.org/legal/epl-v20.html */ - package com.example.project import org.junit.jupiter.api.Assertions.assertEquals diff --git a/platform-tooling-support-tests/projects/gradle-missing-engine/src/test/java/FooTests.java b/platform-tooling-support-tests/projects/gradle-missing-engine/src/test/java/FooTests.java index 79025029964a..86d922c20f4f 100644 --- a/platform-tooling-support-tests/projects/gradle-missing-engine/src/test/java/FooTests.java +++ b/platform-tooling-support-tests/projects/gradle-missing-engine/src/test/java/FooTests.java @@ -1,5 +1,6 @@ + /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -7,7 +8,6 @@ * * https://www.eclipse.org/legal/epl-v20.html */ - import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Assertions; @@ -15,8 +15,8 @@ class FooTests { - @Test - void test() { - fail("This test must not be executed!"); - } + @Test + void test() { + fail("This test must not be executed!"); + } } diff --git a/platform-tooling-support-tests/projects/gradle-starter/src/main/java/com/example/project/Calculator.java b/platform-tooling-support-tests/projects/gradle-starter/src/main/java/com/example/project/Calculator.java index 91436757229c..6feca6bfc04b 100644 --- a/platform-tooling-support-tests/projects/gradle-starter/src/main/java/com/example/project/Calculator.java +++ b/platform-tooling-support-tests/projects/gradle-starter/src/main/java/com/example/project/Calculator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/projects/gradle-starter/src/test/java/com/example/project/CalculatorTests.java b/platform-tooling-support-tests/projects/gradle-starter/src/test/java/com/example/project/CalculatorTests.java index b0dfc0524564..695282baccc8 100644 --- a/platform-tooling-support-tests/projects/gradle-starter/src/test/java/com/example/project/CalculatorTests.java +++ b/platform-tooling-support-tests/projects/gradle-starter/src/test/java/com/example/project/CalculatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -27,15 +27,15 @@ void addsTwoNumbers() { } @ParameterizedTest(name = "{0} + {1} = {2}") - @CsvSource({ - "0, 1, 1", - "1, 2, 3", - "49, 51, 100", - "1, 100, 101" + @CsvSource({ // + "0, 1, 1", // + "1, 2, 3", // + "49, 51, 100", // + "1, 100, 101" // }) void add(int first, int second, int expectedResult) { Calculator calculator = new Calculator(); assertEquals(expectedResult, calculator.add(first, second), - () -> first + " + " + second + " should equal " + expectedResult); + () -> first + " + " + second + " should equal " + expectedResult); } } diff --git a/platform-tooling-support-tests/projects/java-versions/src/test/java/JUnitPlatformCommonsTests.java b/platform-tooling-support-tests/projects/java-versions/src/test/java/JUnitPlatformCommonsTests.java index 9207c79941fa..53a15919c631 100644 --- a/platform-tooling-support-tests/projects/java-versions/src/test/java/JUnitPlatformCommonsTests.java +++ b/platform-tooling-support-tests/projects/java-versions/src/test/java/JUnitPlatformCommonsTests.java @@ -1,3 +1,13 @@ + +/* + * Copyright 2015-2023 the original author or 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.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/platform-tooling-support-tests/projects/maven-starter/src/main/java/com/example/project/Calculator.java b/platform-tooling-support-tests/projects/maven-starter/src/main/java/com/example/project/Calculator.java index 91436757229c..6feca6bfc04b 100644 --- a/platform-tooling-support-tests/projects/maven-starter/src/main/java/com/example/project/Calculator.java +++ b/platform-tooling-support-tests/projects/maven-starter/src/main/java/com/example/project/Calculator.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/projects/maven-starter/src/test/java/com/example/project/CalculatorTests.java b/platform-tooling-support-tests/projects/maven-starter/src/test/java/com/example/project/CalculatorTests.java index b0dfc0524564..695282baccc8 100644 --- a/platform-tooling-support-tests/projects/maven-starter/src/test/java/com/example/project/CalculatorTests.java +++ b/platform-tooling-support-tests/projects/maven-starter/src/test/java/com/example/project/CalculatorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -27,15 +27,15 @@ void addsTwoNumbers() { } @ParameterizedTest(name = "{0} + {1} = {2}") - @CsvSource({ - "0, 1, 1", - "1, 2, 3", - "49, 51, 100", - "1, 100, 101" + @CsvSource({ // + "0, 1, 1", // + "1, 2, 3", // + "49, 51, 100", // + "1, 100, 101" // }) void add(int first, int second, int expectedResult) { Calculator calculator = new Calculator(); assertEquals(expectedResult, calculator.add(first, second), - () -> first + " + " + second + " should equal " + expectedResult); + () -> first + " + " + second + " should equal " + expectedResult); } } diff --git a/platform-tooling-support-tests/projects/maven-surefire-compatibility/pom.xml b/platform-tooling-support-tests/projects/maven-surefire-compatibility/pom.xml new file mode 100644 index 000000000000..2eda3ba4d826 --- /dev/null +++ b/platform-tooling-support-tests/projects/maven-surefire-compatibility/pom.xml @@ -0,0 +1,74 @@ + + + 4.0.0 + + com.example + maven-surefire-compatibility + 1.0-SNAPSHOT + + + UTF-8 + 1.8 + ${maven.compiler.source} + ${env.JUNIT_JUPITER_VERSION} + ${env.JUNIT_PLATFORM_VERSION} + + + + + org.junit.jupiter + junit-jupiter + ${junit.jupiter.version} + test + + + + + + + maven-compiler-plugin + 3.8.1 + + + maven-surefire-plugin + ${surefire.version} + + + + junit.platform.listeners.uid.tracking.enabled = true + + + + + + + + + + local-temp + file://${maven.repo} + + true + + + true + + + + + + + manual-platform-dependency + + + org.junit.platform + junit-platform-launcher + ${junit.platform.version} + test + + + + + + diff --git a/platform-tooling-support-tests/projects/maven-surefire-compatibility/src/test/java/com/example/project/DummyTests.java b/platform-tooling-support-tests/projects/maven-surefire-compatibility/src/test/java/com/example/project/DummyTests.java new file mode 100644 index 000000000000..a695ded160b5 --- /dev/null +++ b/platform-tooling-support-tests/projects/maven-surefire-compatibility/src/test/java/com/example/project/DummyTests.java @@ -0,0 +1,26 @@ +/* + * Copyright 2015-2023 the original author or 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 + */ + +package com.example.project; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +class DummyTests { + + @Test + void test() { + } + +} diff --git a/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/JupiterIntegrationTests.java b/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/JupiterIntegrationTests.java index 2542b21a8011..311153970b7c 100644 --- a/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/JupiterIntegrationTests.java +++ b/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/JupiterIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -42,10 +42,8 @@ void moduleIsNamed() { @Test void resolve() { var selector = DiscoverySelectors.selectClass(getClass()); - var testPlan = LauncherFactory.create().discover(request() - .selectors(selector) - .filters(includeEngines("junit-jupiter")) - .build()); + var testPlan = LauncherFactory.create().discover( + request().selectors(selector).filters(includeEngines("junit-jupiter")).build()); var engine = testPlan.getRoots().iterator().next(); diff --git a/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/ModuleUtilsTests.java b/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/ModuleUtilsTests.java index a4f0442a40c2..50cecc69625f 100644 --- a/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/ModuleUtilsTests.java +++ b/platform-tooling-support-tests/projects/multi-release-jar/default/src/test/java/integration/integration/ModuleUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which @@ -19,9 +19,9 @@ import java.util.Set; import org.junit.jupiter.api.Test; +import org.junit.platform.commons.PreconditionViolationException; import org.junit.platform.commons.util.ClassFilter; import org.junit.platform.commons.util.ModuleUtils; -import org.junit.platform.commons.PreconditionViolationException; /** * Unit tests for {@link ModuleUtils}. diff --git a/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterIntegration.java b/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterIntegration.java index fbedffaffe6a..04505d934cca 100644 --- a/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterIntegration.java +++ b/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterIntegration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterParamsIntegration.java b/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterParamsIntegration.java index d94a2f54ddd0..270b9a163a5c 100644 --- a/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterParamsIntegration.java +++ b/platform-tooling-support-tests/projects/standalone/src/standalone/JupiterParamsIntegration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/projects/standalone/src/standalone/SuiteIntegration.java b/platform-tooling-support-tests/projects/standalone/src/standalone/SuiteIntegration.java index 811ec0f7bc10..a06fc90fbb99 100644 --- a/platform-tooling-support-tests/projects/standalone/src/standalone/SuiteIntegration.java +++ b/platform-tooling-support-tests/projects/standalone/src/standalone/SuiteIntegration.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/projects/standalone/src/standalone/VintageIntegration.java b/platform-tooling-support-tests/projects/standalone/src/standalone/VintageIntegration.java index 16bcab6704c6..3fb2886391c6 100644 --- a/platform-tooling-support-tests/projects/standalone/src/standalone/VintageIntegration.java +++ b/platform-tooling-support-tests/projects/standalone/src/standalone/VintageIntegration.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/projects/vintage/src/test/java/com/example/vintage/VintageTest.java b/platform-tooling-support-tests/projects/vintage/src/test/java/com/example/vintage/VintageTest.java index bf8e0873de5d..186bbf2eff6a 100644 --- a/platform-tooling-support-tests/projects/vintage/src/test/java/com/example/vintage/VintageTest.java +++ b/platform-tooling-support-tests/projects/vintage/src/test/java/com/example/vintage/VintageTest.java @@ -1,18 +1,27 @@ /* - * This Java source file was generated by the Gradle 'init' task. + * Copyright 2015-2023 the original author or 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 */ + package com.example.vintage; -import org.junit.Test; import static org.junit.Assert.*; +import org.junit.Test; + public class VintageTest { - @Test - public void success() { - // pass - } - @Test - public void failure() { - fail("expected to fail"); - } + @Test + public void success() { + // pass + } + + @Test + public void failure() { + fail("expected to fail"); + } } diff --git a/platform-tooling-support-tests/src/main/java/platform/tooling/support/Helper.java b/platform-tooling-support-tests/src/main/java/platform/tooling/support/Helper.java index 7254a869d9bd..517e4e5fe175 100644 --- a/platform-tooling-support-tests/src/main/java/platform/tooling/support/Helper.java +++ b/platform-tooling-support-tests/src/main/java/platform/tooling/support/Helper.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/main/java/platform/tooling/support/MavenRepo.java b/platform-tooling-support-tests/src/main/java/platform/tooling/support/MavenRepo.java index 1a6dec0cc569..8764aea0b3c1 100644 --- a/platform-tooling-support-tests/src/main/java/platform/tooling/support/MavenRepo.java +++ b/platform-tooling-support-tests/src/main/java/platform/tooling/support/MavenRepo.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/main/java/platform/tooling/support/Request.java b/platform-tooling-support-tests/src/main/java/platform/tooling/support/Request.java index e38dccf0b864..03e2cf13691a 100644 --- a/platform-tooling-support-tests/src/main/java/platform/tooling/support/Request.java +++ b/platform-tooling-support-tests/src/main/java/platform/tooling/support/Request.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ThirdPartyJars.java b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ThirdPartyJars.java index c921cb99be7b..02b256e4551e 100644 --- a/platform-tooling-support-tests/src/main/java/platform/tooling/support/ThirdPartyJars.java +++ b/platform-tooling-support-tests/src/main/java/platform/tooling/support/ThirdPartyJars.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/HelperTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/HelperTests.java index bfde5041e292..fad952bf6253 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/HelperTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/HelperTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/AntStarterTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/AntStarterTests.java index 371dfe77d598..4125ae2c00dc 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/AntStarterTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/AntStarterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ArchUnitTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ArchUnitTests.java index b0cbd859cb40..2b26d8897cb2 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ArchUnitTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ArchUnitTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GraalVmStarterTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GraalVmStarterTests.java index 526393d13a47..463dd0643b62 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GraalVmStarterTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GraalVmStarterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleKotlinExtensionsTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleKotlinExtensionsTests.java index 961737ac0fb3..2b5411be11b9 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleKotlinExtensionsTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleKotlinExtensionsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleMissingEngineTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleMissingEngineTests.java index 5fab1fa4f9aa..c82360af1be6 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleMissingEngineTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleMissingEngineTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleModuleFileTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleModuleFileTests.java index 5b6680228855..008e4bfba5bc 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleModuleFileTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleModuleFileTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleStarterTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleStarterTests.java index 076c998ca40b..69d884cc706d 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleStarterTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/GradleStarterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarContainsManifestFirstTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarContainsManifestFirstTests.java index f25204e8ebde..ee2d7fae37d3 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarContainsManifestFirstTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarContainsManifestFirstTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarDescribeModuleTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarDescribeModuleTests.java index 3ed7bda3efe1..aeb3f7bd2447 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarDescribeModuleTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JarDescribeModuleTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JavaVersionsTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JavaVersionsTests.java index 23d72b4fd733..dce1cfd6e41f 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JavaVersionsTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/JavaVersionsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ManifestTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ManifestTests.java index 006fc7ed72f5..4fabbb75a062 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ManifestTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ManifestTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenPomFileTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenPomFileTests.java index c34995fb89b6..5b5b6f428b94 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenPomFileTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenPomFileTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java index f4caa516af2e..26a7d371cfd3 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenStarterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenSurefireCompatibilityTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenSurefireCompatibilityTests.java new file mode 100644 index 000000000000..f346969b1d6c --- /dev/null +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MavenSurefireCompatibilityTests.java @@ -0,0 +1,70 @@ +/* + * Copyright 2015-2023 the original author or 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 + */ + +package platform.tooling.support.tests; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; +import static platform.tooling.support.Helper.TOOL_TIMEOUT; + +import java.io.IOException; +import java.nio.file.Files; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; +import org.opentest4j.TestAbortedException; + +import platform.tooling.support.Helper; +import platform.tooling.support.MavenRepo; +import platform.tooling.support.Request; + +/** + * @since 1.9.2 + */ +class MavenSurefireCompatibilityTests { + + @ParameterizedTest + @CsvSource(delimiter = '|', nullValues = "", textBlock = """ + 2.22.2 | --activate-profiles=manual-platform-dependency + 3.0.0-M4 | + """) + void testMavenSurefireCompatibilityProject(String surefireVersion, String extraArg) throws IOException { + var extraArgs = extraArg == null ? new Object[0] : new Object[] { extraArg }; + var request = Request.builder() // + .setTool(Request.maven()) // + .setProject("maven-surefire-compatibility") // + .addArguments("-Dmaven.repo=" + MavenRepo.dir()) // + .addArguments("-Dsurefire.version=" + surefireVersion) // + .addArguments("--update-snapshots", "--batch-mode", "test") // + .addArguments(extraArgs) // + .setTimeout(TOOL_TIMEOUT) // + .setJavaHome(Helper.getJavaHome("8").orElseThrow(TestAbortedException::new)) // + .build(); + + var result = request.run(); + + assertFalse(result.isTimedOut(), () -> "tool timed out: " + result); + + assertEquals(0, result.getExitCode()); + assertEquals("", result.getOutput("err")); + + var output = result.getOutputLines("out"); + assertTrue(output.contains("[INFO] BUILD SUCCESS")); + assertTrue(output.contains("[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0")); + + var targetDir = Request.WORKSPACE.resolve(request.getWorkspace()).resolve("target"); + try (var stream = Files.list(targetDir)) { + assertThat(stream.filter(file -> file.getFileName().toString().startsWith("junit-platform-unique-ids"))) // + .hasSize(1); + } + } +} diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ModularUserGuideTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ModularUserGuideTests.java index 1cfc95855574..3c2fc9fe17ad 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ModularUserGuideTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ModularUserGuideTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MultiReleaseJarTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MultiReleaseJarTests.java index 0a8fdb4b26a6..438ca769d65d 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MultiReleaseJarTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/MultiReleaseJarTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/PackageCyclesDetectionTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/PackageCyclesDetectionTests.java index 45a7d5bac9ab..1162db674359 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/PackageCyclesDetectionTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/PackageCyclesDetectionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java index c02c91a67584..6bd095431836 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/StandaloneTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ToolProviderTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ToolProviderTests.java index 779c5eb33f51..33243c0a90cd 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ToolProviderTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/ToolProviderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageGradleIntegrationTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageGradleIntegrationTests.java index b4bd053697ec..2a1fad0ed689 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageGradleIntegrationTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageGradleIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageMavenIntegrationTests.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageMavenIntegrationTests.java index 3b94f1c893d6..624e239cf49a 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageMavenIntegrationTests.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/VintageMavenIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/XmlAssertions.java b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/XmlAssertions.java index 976920ae03bd..312cdacafcdd 100644 --- a/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/XmlAssertions.java +++ b/platform-tooling-support-tests/src/test/java/platform/tooling/support/tests/XmlAssertions.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which diff --git a/settings.gradle.kts b/settings.gradle.kts index 6cc4aa4ef877..91c857de5aa2 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,14 +5,15 @@ pluginManagement { gradlePluginPortal() } plugins { - id("com.gradle.enterprise") version "3.11.1" // keep in sync with buildSrc/build.gradle.kts - id("com.gradle.common-custom-user-data-gradle-plugin") version "1.8.1" - id("org.ajoberstar.git-publish") version "3.0.0" + id("com.gradle.enterprise") version "3.12.1" // keep in sync with buildSrc/build.gradle.kts + id("com.gradle.common-custom-user-data-gradle-plugin") version "1.8.2" + id("org.gradle.toolchains.foojay-resolver-convention") version "0.4.0" + id("org.ajoberstar.git-publish") version "4.1.1" kotlin("jvm") version "1.5.31" // Check if workaround in documentation.gradle.kts can be removed when upgrading id("org.asciidoctor.jvm.convert") version "3.3.2" id("org.asciidoctor.jvm.pdf") version "3.3.2" - id("me.champeau.jmh") version "0.6.6" + id("me.champeau.jmh") version "0.6.8" id("io.spring.nohttp") version "0.0.10" id("io.github.gradle-nexus.publish-plugin") version "1.1.0" } @@ -21,6 +22,7 @@ pluginManagement { plugins { id("com.gradle.enterprise") id("com.gradle.common-custom-user-data-gradle-plugin") + id("org.gradle.toolchains.foojay-resolver-convention") } dependencyResolutionManagement { @@ -64,7 +66,6 @@ gradleEnterprise { } val enableTestDistribution = providers.gradleProperty("enableTestDistribution") - .forUseAtConfigurationTime() .map(String::toBoolean) .getOrElse(false) if (enableTestDistribution) { diff --git a/src/spotless/eclipse-public-license-2.0.java b/src/spotless/eclipse-public-license-2.0.java index f05cfbf6309c..9bbea1d478a3 100644 --- a/src/spotless/eclipse-public-license-2.0.java +++ b/src/spotless/eclipse-public-license-2.0.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2023 the original author or authors. * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v2.0 which