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 #2626
  • Loading branch information
sbrannen committed Jun 17, 2021
1 parent 694efb6 commit 57e48f6
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 57e48f6

Please sign in to comment.