-
Notifications
You must be signed in to change notification settings - Fork 2
XUnit v3 upgrade + fixes #50
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 modernizes the Atc.Test library by upgrading from xUnit v2 to xUnit v3 and introduces a major version bump to 2.0. The upgrade enhances data attribute capabilities with async extensibility, implements deterministic frozen value handling with exact-type promotion, and improves safety around specimen reuse.
Key Changes
- xUnit v3 Migration: Complete migration of data attributes to use async
ValueTask<IReadOnlyCollection<ITheoryDataRow>>extensibility model - Enhanced Frozen Logic: Introduced two-phase frozen handling with positional reuse and exact-type promotion for member data attributes
- Infrastructure Modernization: Updated CI pipelines to .NET 9, comprehensive README restructuring, and improved developer experience
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
version.json |
Major version bump from 1.1 to 2.0 reflecting breaking changes |
src/Atc.Test/Atc.Test.csproj |
Updated dependencies to xUnit v3 and added .NET 9 target framework |
src/Atc.Test/MemberAutoNSubstituteDataAttribute.cs |
Complete rewrite to support async data generation with exact-type promotion |
src/Atc.Test/ClassAutoNSubstituteDataAttribute.cs |
Migrated to async model with positional-only frozen injection |
src/Atc.Test/FrozenParameterInjector.cs |
New shared helper centralizing frozen injection logic |
test/Atc.Test.Tests/MemberAutoNSubstituteDataAttributeTests.cs |
Added comprehensive tests for frozen reuse scenarios |
README.md |
Complete restructure with value proposition, compatibility notes, and usage examples |
.github/workflows/ |
Updated CI workflows to use .NET 9 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
rickykaare
left a comment
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 good 😊 Great job!
…te pattern Use protected AutoDataAttribute(Func<IFixture>) constructor with lambda. Fully qualify FixtureFactory to avoid shadowing with base property. Ensures custom fixture customizations still applied post-migration.
…nc GetData Replace IEnumerable<object[]> GetData override with ValueTask<IReadOnlyCollection<ITheoryDataRow>>. Augment each row with frozen parameter injection + generated specimens. Preserve row metadata; guard against null traits. Align with v3 TheoryDataRow / ITheoryDataRow contract.
…ta pipeline Remove obsolete [DataDiscoverer] (reflection abstractions removed in xUnit v3). Replace deprecated ConvertDataItem override with async GetData(MethodInfo, DisposalTracker). Wrap base data rows into new TheoryDataRow instances and append AutoFixture-generated specimens for missing parameters. Preserve existing metadata (skip, explicit, traits, etc.).
… to satisfy CA1019
…, upgrade guidance)
2833db3 to
94fe8d5
Compare
Summary
Upgrade and modernization of Atc.Test to xUnit v3 with improved data attribute capabilities, deterministic frozen value handling, stronger safety around specimen reuse, and CI pipeline upgrade to .NET 9.
Key Changes
Framework & Infrastructure
ValueTask<IReadOnlyCollection<ITheoryDataRow>>).xunit.v3.extensibility.core; consumers must add a directPackageReferencetoxunit.v3.Data Attribute Enhancements
MemberAutoNSubstituteDataAttribute
ClassAutoNSubstituteDataAttribute
FrozenParameterInjector(shared helper extracting and unifying frozen injection logic).Frozen Semantics Hardening
IsInstanceOfTypematching with exact declared type + earliest index rule.Documentation & Developer Experience
xunit.v3a transitive dependency.Tests
Refactoring & Cleanup
FrozenParameterInjector.CI / Pipeline Modernization
actions/setup-dotnet 9.0.x).Breaking Changes
PackageReference Include="xunit.v3"[Frozen]or supply explicit alternate instance if reuse undesiredxunit.v3not pulled in indirectlyRationale
FrozenParameterInjector) simplifies maintenance and future enhancement.Implementation Notes
[Frozen]parameter typeITheoryDataRowproperties copied (Label, Explicit, Timeout, Traits) for supported sourcesCloses #49