-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Adding bUnit tests #218
Merged
Merged
Adding bUnit tests #218
Conversation
This file contains 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
…d to investigate.
…alidation, all rules are automatically included, but when doing it with `ValidateAsync`, they need to be included manually.
Conclusion of #216 |
@chrissainty Is this the way you imagined it? |
pwelter34
approved these changes
Mar 28, 2024
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.
Looks great, thanks for contribution
@luetm If you can update your branch, i can merge this. Thanks |
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.
Ok, this is what I have written so far. I have come across some issues, on which I need your feedback to.
Rule sets applied inconsistently
When validators contain rule sets, but these rule sets are not being included manually:
Validate
andValidateAsync
seem to ignore themIs this intended behavior?
Validation options
The syntax provided from the readme seems to be broken:
When I add this I get compiler messages, and I was unable to fix them by fiddling with the syntax or adding a
private void IncludeNames(ValidationStrategy<object> options) { ... }
. Adding them by code works. The message is about the FluentValidation.Internals namespace not existing.GetFailuresFromLastValidation
To my shame,
GetFailuresFromLastValidation()
only seems to work when usingValidateAsync
, not when usingValidate
. 2 tests are failing because of this, which is intended. The problem is, that only ValiadteAsync() adds the validation failures to theLastValidationResult
property. Is it possible to add this withValidate
or should we just add it as a caveat to the readme?Please feel free to point out other issues I should test, or changes I should make!