Skip to content

Commit

Permalink
Document best practices for test method and test class visibility
Browse files Browse the repository at this point in the history
This is a follow up to 419ddb1.

Closes junit-team#2626
  • Loading branch information
sbrannen authored and runningcode committed Feb 15, 2023
1 parent 0569262 commit f6a584e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ they must _not_ be `private`.
It is generally recommended to omit the `public` modifier for test classes, test methods,
and lifecycle methods unless there is a technical reason for doing so – for example, when
a test class is extended by a test class in another package.
a test class is extended by a test class in another package. Another technical reason for
making classes and methods `public` is to simplify testing on the module path when using
the Java Module System.
====

The following test class demonstrates the use of `@Test` methods and all supported
Expand Down

0 comments on commit f6a584e

Please sign in to comment.