Skip to content

fix(deps): migrate FluentAssertions to AwesomeAssertions 8.x#114

Merged
TheSemicolon merged 1 commit into
devfrom
fix/fluentassertions-license
May 4, 2026
Merged

fix(deps): migrate FluentAssertions to AwesomeAssertions 8.x#114
TheSemicolon merged 1 commit into
devfrom
fix/fluentassertions-license

Conversation

@TheSemicolon
Copy link
Copy Markdown
Collaborator

Summary

Closes #98.

FluentAssertions v8+ is governed by the Xceed Commercial license and emits a runtime warning on every test run requiring a paid subscription for commercial use. AwesomeAssertions is the community Apache 2.0 fork of FluentAssertions v7.

Why AwesomeAssertions 8.x specifically (not 9.x or alternatives)

  • AwesomeAssertions 8.x kept the FluentAssertions namespace verbatim — package rename only, zero source changes across all 19 test files. v9 renames to AwesomeAssertions namespace; deferred to a follow-up PR.
  • Strongest fork-as-strategy position in recent .NET history. 6 named maintainers + Tidelift backing + 19 releases since the early-2025 fork. Compared head-to-head with prior fork attempts (Moq → SponsorLink, IdentityServer4 → Duende, ImageSharp → Six Labors), all of which lacked the multi-maintainer + Tidelift signal and stalled.
  • API-compatible exit path remains — if the fork stalls in 2027, switch to Shouldly or paid Xceed without re-paying the namespace cost.
  • Shouldly was considered but requires rewriting every assertion site (different invocation model: x.ShouldBe(y) vs x.Should().Be(y); no BeOneOf; ThrowAsync invocation order flips).

Full research summary in the conversation that produced this PR; key liveliness signals:

Liveliness:        Active
Last release:      v9.4.0 — 2026-02-18
Commit activity:   1,042 commits; analyzers package updated 2026-05-01
Risk level:        Low
NuGet downloads:   10.9M total in ~15 months
Bus factor:        6 named maintainers + Tidelift backing

Changes

  • tests/ExpertiseApi.Tests/ExpertiseApi.Tests.csproj: <PackageReference Include="FluentAssertions" Version="8.*" /><PackageReference Include="AwesomeAssertions" Version="8.*" /> plus a comment explaining the choice
  • .github/dependabot.yml: added an ignore rule for the original FluentAssertions package so future Dependabot PRs cannot re-introduce the commercial v8

Type of Change

  • feat — new feature
  • fix — bug fix
  • docs — documentation only
  • chore — maintenance
  • refactor — restructuring without behavior change
  • test — adding or updating tests
  • ci — CI/CD changes
  • style — formatting or linting fixes
  • Breaking change (add ! to PR title)

Test Plan

  • dotnet restore — clean
  • dotnet build ExpertiseApi.slnx -c Release — 0 errors, 219 warnings (same baseline)
  • dotnet test --filter "FullyQualifiedName~Unit" — 86/86 pass
  • No Xceed commercial-license warning in test output (was emitted on every test run before; verified absent now)
  • Integration tests: deferred to CI

Checklist

  • No secrets or credentials committed
  • Linter clean on changed files
  • Database migrations are reversible (if applicable) — N/A
  • API changes are backward-compatible — test-only dependency swap, no application code touched
  • CLAUDE.md updated (if commands, endpoints, or workflow changed) — N/A; "Testing" section's framework stack table mentions FluentAssertions, but I'd defer that doc update to a follow-up if/when v9 namespace sweep happens

Follow-ups

  • v9 namespace sweep (global using AwesomeAssertions; in GlobalUsings.cs + remove per-file using FluentAssertions;)
  • CLAUDE.md "Framework Stack" table refresh after the v9 sweep

Closes #98

Closes #98.

FluentAssertions v8+ is governed by the Xceed Commercial license and emits a runtime warning on every test run requiring a paid subscription for commercial use. AwesomeAssertions is the community Apache 2.0 fork of FluentAssertions v7.

Why AwesomeAssertions 8.x specifically (not 9.x or alternatives):
- AwesomeAssertions 8.x kept the FluentAssertions namespace verbatim — package rename only, ZERO source changes across all 19 test files. v9 renames to AwesomeAssertions namespace; deferred to a follow-up PR.
- 6 named maintainers + Tidelift backing + 19 releases since the early-2025 fork = strongest fork-as-strategy position in recent .NET history (case studies: Moq, IdentityServer4, ImageSharp).
- API-compatible exit path remains: if the fork stalls in 2027, switch to Shouldly or paid Xceed without re-paying the namespace cost.
- Shouldly was considered but requires rewriting every assertion site (different invocation model: x.ShouldBe(y) vs x.Should().Be(y); no BeOneOf, ThrowAsync invocation flips).

Changes:
- ExpertiseApi.Tests.csproj: PackageReference Include="FluentAssertions" Version="8.*" → Include="AwesomeAssertions" Version="8.*"
- .github/dependabot.yml: added ignore rule for the original FluentAssertions package so future Dependabot PRs cannot re-introduce the commercial v8

Validation:
- dotnet build: 0 errors, 219 warnings (same baseline)
- 86/86 unit tests pass
- No Xceed commercial-license warning in test output
@TheSemicolon TheSemicolon self-assigned this May 4, 2026
@TheSemicolon TheSemicolon merged commit 6b37651 into dev May 4, 2026
9 checks passed
@TheSemicolon TheSemicolon deleted the fix/fluentassertions-license branch May 4, 2026 02:19
TheSemicolon pushed a commit that referenced this pull request May 4, 2026
AwesomeAssertions 9.x renamed the namespace from FluentAssertions to AwesomeAssertions. Hoist the import to GlobalUsings.cs and drop the per-file 'using FluentAssertions;' across 18 test files. The previous global usings (Xunit, Microsoft.EntityFrameworkCore) are preserved.

This was the deferred follow-up scoped out of PR #114 (the v8.x package rename that closed #98). The Dependabot bump that triggered this PR (Bump AwesomeAssertions 8.2.0 → 9.4.0) carries the v8.x → 9.x package change; this commit completes the namespace migration so the build compiles.

Branch was rebased onto current dev to pick up PR7a/PR7b/PR7c (issue #101) before the sweep, so the diff against dev shows only this PR's changes.

Validation:
- dotnet build: 0 errors, 0 warnings
- dotnet test --filter Unit: 86/86 pass
- dotnet format analyzers --verify-no-changes: exit 0
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

1 similar comment
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(deps): decide FluentAssertions licensing path (commercial / downgrade / migrate)

1 participant