test: Correct Age.toString test - #476
Merged
Merged
Conversation
It dawned on me that since I wish to change how `Age` is represented, it doesn't work if test cases are coupled to the current representation.
Contributor
Greptile SummaryThe PR decouples the
Confidence Score: 5/5The PR appears safe to merge, with no actionable regressions identified. The revised fixtures reconstruct the same Important Files Changed
Reviews (1): Last reviewed commit: "test: Correct Age.toString test" | Re-trigger Greptile |
halcwb
approved these changes
Aug 20, 2026
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.
Overview
Correct existing test of
Patient.Age.toString.Further information
It dawned on me that since I wish to change how
Ageis represented (re #469), it doesn't work if test cases are coupled to the current representation.This pull request changes the test cases for
Patient.Age.toStringso that they don't directly make use of theAgetype, but rather usesintto represent the total number of days of a patient age. This should enable us to refactorAgewhile keeping the test cases.Divergence from plan
The pull request is unfortunately much larger than 200 lines of code, which is caused by 100 FsCheck-generated test cases that are formatted in a vertically-biased way (re #465).
Verification
dotnet run servertestspass.Author checklist
Note
An issue and agreed implementation plan are necessary unless either fewer than 25 lines have been changed or only documentation has been changed.
I confirm that these changes:
.fssource files (except client-side UI code).AI/Vibe Coding Disclosure
I confirm that I have:
Reviewer checklist
I confirm that: