Skip to content

Commit 1f915ff

Browse files
committed
docs: align test naming with BDD and fix port/URL refs
1 parent 6e65150 commit 1f915ff

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
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: 8 additions & 8 deletions
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

@@ -72,9 +72,9 @@ Dockerfile - Container image definition
7272
2. **Packaged JAR**: `./mvnw clean package && java -jar target/java.samples.spring.boot-*.jar`
7373
3. **Docker**: `docker compose up` (or `docker compose up -d` for background)
7474
4. **Application URLs**:
75-
- API: `http://localhost:8080/players`
76-
- Swagger: `http://localhost:8080/swagger-ui.html`
77-
- Health: `http://localhost:8080/actuator/health`
75+
- API: `http://localhost:9000/players`
76+
- Swagger: `http://localhost:9000/swagger/index.html`
77+
- Health: `http://localhost:9001/actuator/health`
7878

7979
### Adding a search/query endpoint
8080

@@ -97,10 +97,10 @@ Dockerfile - Container image definition
9797

9898
### Troubleshooting common issues
9999

100-
**Port already in use (8080)**:
100+
**Port already in use (9000)**:
101101

102102
```bash
103-
lsof -ti:8080 | xargs kill -9
103+
lsof -ti:9000 | xargs kill -9
104104
```
105105

106106
**Maven dependency issues**:
@@ -198,8 +198,8 @@ Before committing code, ensure these pass:
198198

199199
5. **Manual smoke test** (optional but recommended):
200200
- Start app: `./mvnw spring-boot:run`
201-
- Test endpoint in Swagger UI: `http://localhost:8080/swagger-ui.html`
202-
- Verify health endpoint: `http://localhost:8080/actuator/health`
201+
- Test endpoint in Swagger UI: `http://localhost:9000/swagger/index.html`
202+
- Verify health endpoint: `http://localhost:9001/actuator/health`
203203

204204
## Cross-repo Context
205205

0 commit comments

Comments
 (0)