Skip to content

test(controller): normalize data-state vocabulary in tests (#452)#453

Merged
nanotaboada merged 1 commit intomasterfrom
test/452-normalize-data-state-vocabulary
Apr 7, 2026
Merged

test(controller): normalize data-state vocabulary in tests (#452)#453
nanotaboada merged 1 commit intomasterfrom
test/452-normalize-data-state-vocabulary

Conversation

@nanotaboada
Copy link
Copy Markdown
Owner

@nanotaboada nanotaboada commented Apr 7, 2026

Summary

  • Rename five controller test methods from NonExisting to Nonexistent to align with the canonical three-term data-state vocabulary shared across the six comparison repos
  • Add XML doc <remarks> block to PlayerFakes documenting the existing / nonexistent / unknown terms

Test plan

  • All 41 tests pass (dotnet test --settings .runsettings)
  • No logic changes — rename only

Closes #452

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Improved test naming to use a consistent three-term vocabulary for data-state scenarios.
  • Documentation

    • Added shared vocabulary remarks to test utilities describing "existing", "nonexistent", and "unknown" states.
  • Chores

    • Minor internal standardization and maintenance for naming consistency.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8709a015-25d9-4dc0-98b5-add6d055bdf4

📥 Commits

Reviewing files that changed from the base of the PR and between 54af70f and ca14195.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • test/Dotnet.Samples.AspNetCore.WebApi.Tests/Unit/PlayerControllerTests.cs
  • test/Dotnet.Samples.AspNetCore.WebApi.Tests/Utilities/PlayerFakes.cs
✅ Files skipped from review due to trivial changes (2)
  • test/Dotnet.Samples.AspNetCore.WebApi.Tests/Utilities/PlayerFakes.cs
  • test/Dotnet.Samples.AspNetCore.WebApi.Tests/Unit/PlayerControllerTests.cs
🚧 Files skipped from review as they are similar to previous changes (1)
  • CHANGELOG.md

Walkthrough

Renamed five controller test methods to normalize data-state vocabulary and added an XML <remarks> block to PlayerFakes documenting the three-term convention; also added two entries to CHANGELOG.md describing these edits.

Changes

Cohort / File(s) Summary
Changelog Documentation
CHANGELOG.md
Added two [Unreleased] entries documenting the test method renames and the new <remarks> on PlayerFakes.
Controller Test Method Renaming
test/Dotnet.Samples.AspNetCore.WebApi.Tests/Unit/PlayerControllerTests.cs
Renamed five test methods: NonExistingNonexistent (POST) and NonExistingUnknown (GET-by-id, GET-by-squad-number, PUT-by-squad-number, DELETE-by-squad-number). No logic or assertions changed.
Test Utilities Documentation
test/Dotnet.Samples.AspNetCore.WebApi.Tests/Utilities/PlayerFakes.cs
Added XML <remarks> documenting the three-term data-state vocabulary: existing, nonexistent, and unknown. No functional changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Assessment against linked issues

Objective Addressed Explanation
Rename five controller test methods from NonExisting to canonical terms [#452]
Add XML doc comment to PlayerFakes documenting the three-term convention [#452]
No logic changes beyond renaming and documentation [#452]

Possibly related PRs

🚥 Pre-merge checks | ✅ 1 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title follows Conventional Commits format (test:), is under 80 characters (65), and clearly describes the main change: normalizing data-state vocabulary in controller tests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/452-normalize-data-state-vocabulary
  • 🛠️ sync documentation: Commit on current branch
  • 🛠️ sync documentation: Create PR
  • 🛠️ enforce http error handling: Commit on current branch
  • 🛠️ enforce http error handling: Create PR
  • 🛠️ idiomatic review: Commit on current branch
  • 🛠️ idiomatic review: Create PR
  • 🛠️ verify api contract: Commit on current branch
  • 🛠️ verify api contract: Create PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/Dotnet.Samples.AspNetCore.WebApi.Tests/Unit/PlayerControllerTests.cs`:
- Line 206: Rename the four test methods that use "Nonexistent" to "Unknown" to
match the PlayerFakes vocabulary: change
Get_PlayerById_Nonexistent_Returns404NotFound to
Get_PlayerById_Unknown_Returns404NotFound,
Get_PlayerBySquadNumber_Nonexistent_Returns404NotFound to
Get_PlayerBySquadNumber_Unknown_Returns404NotFound,
Put_PlayerBySquadNumber_Nonexistent_Returns404NotFound to
Put_PlayerBySquadNumber_Unknown_Returns404NotFound, and
Delete_PlayerBySquadNumber_Nonexistent_Returns404NotFound to
Delete_PlayerBySquadNumber_Unknown_Returns404NotFound; update any references to
these method names (test discovery attributes, callers, or string literals) so
they remain consistent.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b163832d-bdf4-4930-b760-4fdf57cee303

📥 Commits

Reviewing files that changed from the base of the PR and between c8128b4 and 54af70f.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • test/Dotnet.Samples.AspNetCore.WebApi.Tests/Unit/PlayerControllerTests.cs
  • test/Dotnet.Samples.AspNetCore.WebApi.Tests/Utilities/PlayerFakes.cs

Comment thread test/Dotnet.Samples.AspNetCore.WebApi.Tests/Unit/PlayerControllerTests.cs Outdated
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@nanotaboada nanotaboada force-pushed the test/452-normalize-data-state-vocabulary branch from 54af70f to ca14195 Compare April 7, 2026 14:20
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

@nanotaboada nanotaboada merged commit 4f7593f into master Apr 7, 2026
9 checks passed
@nanotaboada nanotaboada deleted the test/452-normalize-data-state-vocabulary branch April 7, 2026 14:31
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.

Normalize data-state vocabulary in controller tests

1 participant