-
-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor AgainstExpression to Expression for Clarity and Consistency #317
Refactor AgainstExpression to Expression for Clarity and Consistency #317
Conversation
…rdAgainstExpressionExtensions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your comments say the expression will throw if the func evaluates to true
but your actual code and tests say that it should throw when the func is false. Keep the comments and change the code to match.
Revised Guard.Against.Expression and Guard.Against.ExpressionAsync to throw ArgumentException when expressions evaluate to true, aligning with the documentation. This change ensures consistency and correctness in method behavior.
Refactored unit tests for Guard.Against.Expression to match updated method logic. Tests now correctly handle scenarios where expressions evaluate to true, with adjustments to test conditions and error messages for clarity.
Thank you for the feedback! Made two more commits addressing the issues. |
Thanks, I'll get this out soon! |
Fix: Update AgainstExpression to Expression
Summary: This PR addresses issue #309. The changes include renaming AgainstExpression to Expression, marking the former as obsolete, and ensuring that the new method clearly indicates that the expression should describe the INVALID state.
Changes Made:
Testing:
Checklist:
@ardalis Please review the changes and provide your insights.