Skip to content

Replace FluentAssertions with xunit assertions - #3

Merged
jacalapa merged 1 commit into
mainfrom
test/drop-fluentassertions
Oct 12, 2026
Merged

jacalapa merged 1 commit into
mainfrom
test/drop-fluentassertions

Conversation

@jacalapa

Copy link
Copy Markdown
Contributor

What

  • Replaces FluentAssertions with plain xunit Assert in all three test projects (263 assertions) and drops the package. FluentAssertions 8 has a commercial license.
  • Where xunit behaves differently, the conversion keeps FluentAssertions' meaning:
    • BeEquivalentTo became Assert.Equivalent(..., strict: true). It ignores order, and strict rejects extra items, as FluentAssertions did.
    • ThrowAsync<T> became ThrowsAnyAsync<T>, which also accepts derived exceptions.
    • BeEmpty on a nullable array is NotNull plus Empty.
  • These cases were checked side by side against FluentAssertions 8.11.0.

Tests

  • Same counts as main: unit 164, PostgreSQL 23, SQL Server 23, all passing locally.

FluentAssertions 8 is distributed under a commercial license, so drop it
and use xunit's built-in Assert API instead. Assertions are translated
one-to-one; order-insensitive BeEquivalentTo checks use
Assert.Equivalent with strict: true.
@jacalapa
jacalapa merged commit 28bdd07 into main Oct 12, 2026
3 checks passed
@jacalapa
jacalapa deleted the test/drop-fluentassertions branch October 12, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant