Skip to content

Conversation

@samtrion
Copy link
Member

@samtrion samtrion commented May 6, 2025

No description provided.

@samtrion samtrion requested a review from Copilot May 6, 2025 20:28
@samtrion samtrion self-assigned this May 6, 2025
@samtrion samtrion requested a review from a team as a code owner May 6, 2025 20:28
@samtrion samtrion added the state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai label May 6, 2025
@samtrion samtrion requested a review from benwirren May 6, 2025 20:28
@samtrion samtrion added the type:architectural runway Indicate work items related to architectural runway, which prepares upcoming features. label May 6, 2025
Copy link

Copilot AI left a 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());

@samtrion samtrion force-pushed the feature/switched-to-tunit branch from e29f1b9 to 9ab1041 Compare May 12, 2025 09:31
@samtrion samtrion closed this May 12, 2025
@samtrion samtrion reopened this May 12, 2025
@samtrion samtrion closed this May 12, 2025
@samtrion samtrion reopened this May 12, 2025
@samtrion samtrion closed this May 12, 2025
@samtrion samtrion reopened this May 12, 2025
@samtrion samtrion closed this May 12, 2025
@samtrion samtrion reopened this May 12, 2025
@codecov
Copy link

codecov bot commented May 12, 2025

Codecov Report

Attention: Patch coverage is 93.54839% with 2 lines in your changes missing coverage. Please review.

Project coverage is 98.54%. Comparing base (7271406) to head (86efb1a).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...volve.FluentValue/Constraints/DefaultConstraint.cs 0.00% 0 Missing and 1 partial ⚠️
...ve.FluentValue/Constraints/NotDefaultConstraint.cs 83.33% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@samtrion samtrion merged commit 75f35d0 into main May 12, 2025
13 of 16 checks passed
@samtrion samtrion deleted the feature/switched-to-tunit branch May 12, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state:ready for merge Indicates that a pull request has been reviewed and approved, and is ready to be merged into the mai type:architectural runway Indicate work items related to architectural runway, which prepares upcoming features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants