RFR: 8304014: Convert test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java to junit [v3]

Eirik Bjorsnos duke at openjdk.org
Wed Mar 29 18:37:27 UTC 2023


On Wed, 29 Mar 2023 18:25:34 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> Eirik Bjorsnos has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Junit version
>
> test/jdk/java/util/zip/ZipFile/CorruptedZipFiles.java line 36:
> 
>> 34: import org.junit.BeforeClass;
>> 35: import org.junit.Test;
>> 36: 
> 
> I believe you should be using corresponding annotations from `org.junit.jupiter.api` instead.
> From https://junit.org/junit5/docs/current/user-guide/index.html#migrating-from-junit4
>> `@Before` and `@After` no longer exist; use `@BeforeEach` and `@AfterEach` instead.
>> `@BeforeClass` and `@AfterClass` no longer exist; use `@BeforeAll` and `@AfterAll` instead.
> 
> Similarly the `@Test` annotation should be imported from `org.junit.jupiter.api`

Noob question: Do you know where I find the jars for setting up junit5 in my IDE? jtreg's `junit-platform-console-standalone-1.9.2` does not seem to include these annotations.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/12563#discussion_r1152342103


More information about the core-libs-dev mailing list