Skip to content

test: adopt the _NN_Should<Outcome>_When<Condition> naming convention - #1

Merged
EdgarEldy merged 20 commits into
developfrom
feature/web
Sep 21, 2026
Merged

EdgarEldy merged 20 commits into
developfrom
feature/web

Conversation

@EdgarEldy

Copy link
Copy Markdown
Owner

Rename all 82 test methods to _NN_Should<Outcome>_When<Condition> and document the convention in a new README section (Testing strategy > Test naming convention).

Renaming only, no change to test logic or behavior. Done branch by branch (core-architecture, dao, service, web), each merged into the next, one commit per renamed test class.

Tests: 82/82 pass locally (mvn clean test).

Adds a Testing strategy section, which the README did not have yet, with a Test naming convention subsection: every test method is named _NN_Should<Outcome>_When<Condition>, so a failing test name alone tells what was expected and under which condition.
…ention

Renames every test method of CategoryDaoTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…ention

Renames every test method of CustomerDaoTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
Renames every test method of OrderDaoTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…ntion

Renames every test method of ProductDaoTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…d_When convention

Renames every test method of ServiceIntegrationTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…ld_When convention

Renames every test method of CategoryServiceImplTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…ld_When convention

Renames every test method of CustomerServiceImplTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…Should_When convention

Renames every test method of OrderReferenceGeneratorTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…When convention

Renames every test method of OrderServiceImplTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…d_When convention

Renames every test method of ProductServiceImplTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…_When convention

Renames every test method of CustomerValidatorTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…onvention

Renames every test method of WebIntegrationTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…en convention

Renames every test method of CategoryControllerTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…en convention

Renames every test method of CustomerControllerTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…convention

Renames every test method of OrderControllerTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
…n convention

Renames every test method of ProductControllerTest to _NN_Should<Outcome>_When<Condition>, with the sequence number following the order of the methods in the class; only the method names change, not the tests' logic or behavior.
@EdgarEldy
EdgarEldy merged commit dcacce1 into develop Sep 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant