-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Switched to TUnit
#126
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
Conversation
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.
Pull Request Overview
This PR migrates the testing framework from xUnit to TUnit and updates the fluent value API to include new constraints and operators. Key changes include replacing xUnit attributes with TUnit’s [Test] and [MethodDataSource], introducing new constraint properties (NotDefault, NotEmpty, NotNull) in the Value API, and refactoring operator classes to inherit from ConstraintBase rather than OperatorBase.
Reviewed Changes
Copilot reviewed 14 out of 18 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/NetEvolve.FluentValue.Tests.Unit/ConstraintTests.cs | Migrated test attributes and data sources to TUnit style. |
| src/NetEvolve.FluentValue/Value.cs | Updated documentation and added new constraint properties for additional validations. |
| src/NetEvolve.FluentValue/TypeExtensions.cs | Introduced a utility extension for obtaining default values. |
| src/NetEvolve.FluentValue/Operators/*.cs | Refactored operator classes to use ConstraintBase and updated the SetConstraint API. |
| src/NetEvolve.FluentValue/Constraints/*.cs | Added new constraints (NotDefault, NotEmpty, NotNull) and updated DefaultConstraint. |
Files not reviewed (4)
- Directory.Build.props: Language not supported
- Directory.Packages.props: Language not supported
- tests/NetEvolve.FluentValue.Tests.Architecture/NetEvolve.FluentValue.Tests.Architecture.csproj: Language not supported
- tests/NetEvolve.FluentValue.Tests.Unit/NetEvolve.FluentValue.Tests.Unit.csproj: Language not supported
Comments suppressed due to low confidence (1)
src/NetEvolve.FluentValue/IOperator.cs:168
- [nitpick] Verify that the new shorthand constraint properties (NotDefault, NotEmpty, NotNull) in IOperator align with the intended API design and that their naming and usage are clearly documented for consumers.
IConstraint NotDefault => SetConstraint(new NotDefaultConstraint());
d251750 to
e29f1b9
Compare
e29f1b9 to
9ab1041
Compare
…`Func<T>` rather than a `<T>`` for the moment
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #126 +/- ##
==========================================
- Coverage 99.19% 98.54% -0.66%
==========================================
Files 18 22 +4
Lines 249 274 +25
Branches 38 43 +5
==========================================
+ Hits 247 270 +23
+ Misses 2 1 -1
- Partials 0 3 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|


No description provided.