Repository navigation
Conversation
The language API guide and the HTML index now show DescribedPredicate values passed to have and be, with grammatical descriptions, the resulting rule text, and both satisfied and violated messages. The hand-written condition records one SimpleConditionEvent per incoming call, using the @secured check as conditionSatisfied and a message for each outcome. The new prose covers per-call inversion, empty call lists, and why a description that already starts with "have" belongs on .that() rather than on ArchConditions.have. Refs TNG#1438 Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
This branch has not been deployed
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.
Why
The custom-rules section of the user guide shows a single example, and that example only reports failures. Negating the rule therefore cannot point at calls that met the check, and the short way to turn a yes-or-no test into a condition is never shown.
The sample adds SimpleConditionEvent.violated only when the calling method lacks @secured, so a secured call records no event. Negation inverts events that were added and does not invent missing ones. ArchConditions.have and ArchConditions.be are also absent from that section.
What changed
The language API guide and the HTML index now show DescribedPredicate values passed to have and be, with grammatical descriptions, the resulting rule text, and both satisfied and violated messages. The hand-written condition records one SimpleConditionEvent per incoming call, using the @secured check as conditionSatisfied and a message for each outcome. The new prose covers per-call inversion, empty call lists, and why a description that already starts with "have" belongs on .that() rather than on ArchConditions.have.
Testing
The ArchUnit change touches documentation only, so there is no test to run.
Closes #1438