Standardize example error codes on UPPER_SNAKE_CASE#118
Merged
Conversation
Align the example error codes in the public XML documentation (Error.Code, ErrorAssertion) and the testing guide on the UPPER_SNAKE_CASE convention that FCE004 recommends, replacing the dotted PAYMENT.DECLINED style. Keeps the documentation consistent with the codes shown across the rest of the guides.
Update the catalog diff/differ and outcome-assertion fixtures (and their expected report strings) to the UPPER_SNAKE_CASE codes, so the tests match the convention now used in the documentation and examples.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Standardize the example error codes used across the public XML documentation, the testing guide, and the test fixtures on the
UPPER_SNAKE_CASEconvention recommended by theFCE004analyzer, replacing the dottedPAYMENT.DECLINEDstyle. This keeps the examples internally consistent and aligned with the format the library nudges users toward.Type of change
Changes
DOMAIN.REASONform toDOMAIN_REASON(PAYMENT.DECLINED→PAYMENT_DECLINED,PAYMENT.REFUSED→PAYMENT_REFUSED,ORDER.NOT_FOUND→ORDER_NOT_FOUND,ORDER.LOCKED→ORDER_LOCKED,INVENTORY.OUT_OF_STOCK→INVENTORY_OUT_OF_STOCK,SOMETHING.ELSE→SOMETHING_ELSE) in:Error.Coderemarks and theErrorAssertionusage example;doc/Testing.en.mdanddoc/Testing.fr.md;OutcomeAssertionsTests,CatalogDifferTests,CatalogDiffFormatterTests.ErrorCode.Createaccepts either form at runtime (only null/whitespace is rejected); only example and fixture strings changed.doc/CatalogVersioning.{en,fr}.mdare handled by PR docs: make catalog versioning easier to understand #117, so they are left untouched here to avoid a conflict.Testing
dotnet build FirstClassErrors.sln— 0 warnings, 0 errorsdotnet test FirstClassErrors.sln— 668 passed, 0 failedFirstClassErrors.Analyzers.UnitTests) — 51 passedDocumentation
doc/updateddoc/README.fr.md) updated if user-facing behavior changedThe English testing guide and its French translation (
doc/Testing.fr.md) were updated together, so the two stay in sync. No user-facing behavior changed.Related issues
None.
Generated by Claude Code