Skip to content

Commit 61d9aad

Browse files
committed
docs: update test naming examples to BDD Given-When-Then
1 parent 6e65150 commit 61d9aad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This is a Spring Boot REST API for managing football players, demonstrating mode
3333

3434
- **Classes**: PascalCase (e.g., `PlayersController`, `PlayerDTO`)
3535
- **Methods/Variables**: camelCase (e.g., `findById`, `squadNumber`)
36-
- **Test methods**: `method_scenario_outcome` (e.g., `post_squadNumberExists_returnsConflict`)
36+
- **Test methods**: `givenX_whenY_thenZ` (e.g., `givenSquadNumberExists_whenPost_thenReturnsConflict`)
3737

3838
### Annotations
3939

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Dockerfile - Container image definition
6262
- **All tests**: `./mvnw test`
6363
- **With coverage**: `./mvnw clean test jacoco:report` (view: `open target/site/jacoco/index.html`)
6464
- **Single test class**: `./mvnw test -Dtest=PlayersControllerTests`
65-
- **Single test method**: `./mvnw test -Dtest=PlayersControllerTests#getAll_playersExist_returnsOkWithAllPlayers`
65+
- **Single test method**: `./mvnw test -Dtest=PlayersControllerTests#givenPlayersExist_whenGetAll_thenReturnsOkWithAllPlayers`
6666
- **Integration tests require**: In-memory SQLite (automatic, no docker needed)
6767
- **Full CI pipeline locally**: `./mvnw clean install` (compile + test + package + jacoco)
6868

0 commit comments

Comments
 (0)