Skip to content

Replace FluentAssertions with Shouldly#145

Merged
phmatray merged 1 commit intomainfrom
impl/134-replace-fluentassertions-with-shouldly
Feb 27, 2026
Merged

Replace FluentAssertions with Shouldly#145
phmatray merged 1 commit intomainfrom
impl/134-replace-fluentassertions-with-shouldly

Conversation

@phmatray
Copy link
Contributor

Summary

  • Replaced FluentAssertions NuGet package (8.8.0) with Shouldly (4.3.0) in both test projects
  • Updated all GlobalUsings.cs files to use Shouldly instead of FluentAssertions
  • Converted all assertion patterns across 41 test files (667 insertions, 687 deletions)
  • All 455 tests pass after migration (384 unit tests + 71 GitHub tests)

Key Assertion Mappings

FluentAssertions Shouldly
.Should().Be(x) .ShouldBe(x)
.Should().BeTrue() .ShouldBeTrue()
.Should().NotBeNull() .ShouldNotBeNull()
.Should().Throw<T>().WithMessage(m) Should.Throw<T>(action); ex.Message.ShouldBe(m)
.Should().ThrowAsync<T>() Should.ThrowAsync<T>(action)
.Should().ContainEquivalentOf(x) .ShouldContain(x)
.Should().BeCloseTo(dt, ts) (DateTime.Now - dt).ShouldBeLessThan(ts)
.As<T>() .ShouldBeAssignableTo<T>() or cast

Test plan

  • All 384 unit tests pass on net10.0
  • All 71 GitHub integration tests pass on net10.0
  • No remaining FluentAssertions references in any test file
  • No remaining .Should() calls in any test file

Fixes #134

Migrate the test assertion library from FluentAssertions to Shouldly
across both test projects. All 455 tests pass after migration.

Fixes #134
@phmatray phmatray merged commit 352a8b6 into main Feb 27, 2026
2 checks passed
@phmatray phmatray deleted the impl/134-replace-fluentassertions-with-shouldly branch February 27, 2026 16:47
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.

Replace FluentAssertions with Shouldly

1 participant