馃摑 Issue Description
This issue aims to add @DisplayName() annotations for every test method in the test files of all practice exercises in the Java track.
馃敡 What You Need to Do
-
Skip unsynced exercises:
Before starting, make sure the exercise is not listed among the ones with unsynced tests in issue #2959.
-
Locate the test file:
- Go to the exercise folder inside
exercises/practice/<exercise-name>/src/test.
- Open the Java test file (typically named
<ExerciseName>Test.java).
-
Find the canonical source:
- Navigate to the problem-specifications repo.
- Open the corresponding exercise folder and locate
canonical-data.json.
-
Match and annotate tests:
- The test cases in the
.json file are listed in a specific order.
- Match the tests in the Java file with the ones in
canonical-data.json.
- For each test, copy the
"description" and use it as a @DisplayName("") annotation above the corresponding method in the Java test file.
鈿狅笍 Important Guidelines
-
Max 15 exercises per PR:
To avoid large PRs, limit the number of exercises being updated in each PR to a maximum of 15 exercises (less is ok too).
-
Do not close this issue via PRs:
Avoid referencing this issue in your PR with terms like Fixes #XXX or Resolves #XXX, since this would automatically close the issue.
-
Avoid reimplemented exercises:
Make sure you are not copying descriptions from tests that have been reimplemented.
-
Need help?
If you have any questions, feel free to ask in the comments!
馃搵 Checklist of Practice Exercises
馃挕 Reference Example
To understand how to properly add @DisplayName annotations based on canonical-data.json, you can refer to the test file in the Swift Scheduling exercise.
It already includes correctly formatted @DisplayName entries matching the test case descriptions, making it a good template for how your test file should look after the changes.
馃摑 Issue Description
This issue aims to add
@DisplayName()annotations for every test method in the test files of all practice exercises in the Java track.馃敡 What You Need to Do
Skip unsynced exercises:
Before starting, make sure the exercise is not listed among the ones with unsynced tests in issue #2959.
Locate the test file:
exercises/practice/<exercise-name>/src/test.<ExerciseName>Test.java).Find the canonical source:
canonical-data.json.Match and annotate tests:
.jsonfile are listed in a specific order.canonical-data.json."description"and use it as a@DisplayName("")annotation above the corresponding method in the Java test file.Max 15 exercises per PR:
To avoid large PRs, limit the number of exercises being updated in each PR to a maximum of 15 exercises (less is ok too).
Do not close this issue via PRs:
Avoid referencing this issue in your PR with terms like
Fixes #XXXorResolves #XXX, since this would automatically close the issue.Avoid reimplemented exercises:
Make sure you are not copying descriptions from tests that have been reimplemented.
Need help?
If you have any questions, feel free to ask in the comments!
馃搵 Checklist of Practice Exercises
馃挕 Reference Example
To understand how to properly add
@DisplayNameannotations based oncanonical-data.json, you can refer to the test file in the Swift Scheduling exercise.It already includes correctly formatted
@DisplayNameentries matching the test case descriptions, making it a good template for how your test file should look after the changes.