-
Notifications
You must be signed in to change notification settings - Fork 905
Open
Description
In Section 5.2.3 Method Names, the style guide states:
"Underscores may appear in JUnit test method names to separate logical components of the name, with each component written in lowerCamelCase, for example transferMoney_deductsFromSource."
Case that needs clarification:
Single-word components in test method names
@Test void test_foo() {}
@Test void testing_name() {}The style guide states that underscore-separated components must be written in lowerCamelCase, but it does not clarify whether a single-word identifier (e.g. foo, name) qualifies as acceptable lowerCamelCase in this context, or whether each component is expected to consist of multiple camel-case words.
Clarification requested
Should each underscore-separated component in JUnit test method names:
- Be allowed to be any valid lowerCamelCase identifier, including single-word names like foo or name (e.g. testing_foo), or
- Require every component to consist of multiple lowerCamelCase words (e.g. transferMoney_deductsFromSource), or
- Require only the segments after underscores to be proper multi-word lowerCamelCase (e.g. test_deductsFromSource where test is single-word but deductsFromSource is multi-word)
Thank you!
Metadata
Metadata
Assignees
Labels
No labels