Skip to content

Commit f6a584e

Browse files
sbrannenrunningcode
authored andcommitted
Document best practices for test method and test class visibility
This is a follow up to 419ddb1. Closes junit-team#2626
1 parent 0569262 commit f6a584e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: documentation/src/docs/asciidoc/user-guide/writing-tests.adoc

+3-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,9 @@ they must _not_ be `private`.
124124
125125
It is generally recommended to omit the `public` modifier for test classes, test methods,
126126
and lifecycle methods unless there is a technical reason for doing so – for example, when
127-
a test class is extended by a test class in another package.
127+
a test class is extended by a test class in another package. Another technical reason for
128+
making classes and methods `public` is to simplify testing on the module path when using
129+
the Java Module System.
128130
====
129131

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

0 commit comments

Comments
 (0)