Add Atc.Rest.AwesomeAssertions and migrate tests off FluentAssertions#363
Merged
Conversation
added 4 commits
June 24, 2026 13:14
Atc.Test 3.0.0 swaps its transitive assertion dependency from FluentAssertions to AwesomeAssertions (the Apache-2.0 fork of FluentAssertions 7.x), so the solution-wide global using is switched accordingly. - Bump Atc.Test 2.0.17 -> 3.0.0 and swap the global Using FluentAssertions -> AwesomeAssertions. - Atc.Tests: rename HaveCountGreaterOrEqualTo -> HaveCountGreaterThanOrEqualTo (renamed in the fork). - Atc.XUnit.Tests: switch the explicit FluentAssertions global using to AwesomeAssertions. - Atc.Rest.FluentAssertions.Tests: opt out of the AwesomeAssertions global using and keep FluentAssertions, since it tests the FluentAssertions-based library; also drop the redundant ICSharpCode.Decompiler reference (it flows transitively from Atc.XUnit).
…pers Adds Atc.Rest.AwesomeAssertions, the AwesomeAssertions counterpart of Atc.Rest.FluentAssertions, providing expressive assertions for Atc REST domain handler results (BeOkResult, BeNotFoundResult, WithContent, WithErrorMessage, etc.). AwesomeAssertions is a general-purpose assertion library and has no built-in assertions for Atc REST result types, so a dedicated package is warranted. The custom assertions are rewritten against AwesomeAssertions 9.4.0's AssertionChain API (Execute.Assertion was removed and ReferenceTypeAssertions now takes an AssertionChain), so it is not a verbatim copy. - New library (multi-targets net9.0;net10.0) referencing AwesomeAssertions 9.4.0. - New Atc.Rest.AwesomeAssertions.Tests project mirroring the FluentAssertions tests, with message expectations reconciled to AwesomeAssertions 9.x output plus chained-API coverage. - Register both projects in Atc.slnx and add generated CodeDoc.
Add a callout pointing users to the new Atc.Rest.AwesomeAssertions package, which offers the same helpers on the actively maintained Apache-2.0 fork, and note why this package stays pinned to FluentAssertions 7.2.1.
ICSharpCode.Decompiler flows transitively from the Atc.XUnit project reference (it is declared there without PrivateAssets), so the explicit per-project PackageReference and its ItemGroup are redundant. Remove them from the remaining test projects.
davidkallesen
previously approved these changes
Jun 24, 2026
There was a problem hiding this comment.
Pull request overview
This PR introduces a new Atc.Rest.AwesomeAssertions library (an AwesomeAssertions-based counterpart to Atc.Rest.FluentAssertions) and migrates the solution-wide test suite to use AwesomeAssertions via Atc.Test 3.0.0, while explicitly keeping Atc.Rest.FluentAssertions (and its tests) on FluentAssertions.
Changes:
- Added
Atc.Rest.AwesomeAssertions(net9.0/net10.0) and a new dedicated test project with chained-API coverage and generated CodeDoc output. - Migrated test global usings from FluentAssertions to AwesomeAssertions and updated assertion helper naming (
HaveCountGreaterOrEqualTo→HaveCountGreaterThanOrEqualTo). - Removed redundant
ICSharpCode.Decompilerpackage references from test projects and registered new projects inAtc.slnx.
Reviewed changes
Copilot reviewed 54 out of 54 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| test/Directory.Build.props | Bumps Atc.Test to 3.0.0 and switches test global using to AwesomeAssertions. |
| test/Atc.XUnit.Tests/GlobalUsings.cs | Switches test project global using from FluentAssertions to AwesomeAssertions. |
| test/Atc.XUnit.Tests/Atc.XUnit.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.Tests/Helpers/CultureHelperTests.cs | Updates renamed collection-count assertion helper. |
| test/Atc.Tests/Extensions/Reflection/AssemblyExtensionsTests.cs | Updates renamed collection-count assertion helper. |
| test/Atc.Tests/Atc.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.Rest.Tests/Atc.Rest.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.Rest.HealthChecks.Tests/Atc.Rest.HealthChecks.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.Rest.FluentAssertions.Tests/Atc.Rest.FluentAssertions.Tests.csproj | Opts out of AwesomeAssertions global using and restores FluentAssertions for this project. |
| test/Atc.Rest.Extended.Tests/Atc.Rest.Extended.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.Rest.AwesomeAssertions.Tests/XUnitTestData/TestJsonSerializer.cs | Adds test helper for consistent JSON serialization in new AA test project. |
| test/Atc.Rest.AwesomeAssertions.Tests/XUnitTestData/TestDataAssertions.cs | Adds shared MemberData for error-message content scenarios. |
| test/Atc.Rest.AwesomeAssertions.Tests/GlobalUsings.cs | Adds global usings needed by the new AA test project. |
| test/Atc.Rest.AwesomeAssertions.Tests/Extensions/ResultBaseExtensionsTests.cs | Adds tests for ResultBase.Should() chaining behavior with AA. |
| test/Atc.Rest.AwesomeAssertions.Tests/CodeDocumentationTests.cs | Adds Markdown CodeDoc generator “test” for new library docs output. |
| test/Atc.Rest.AwesomeAssertions.Tests/CodeComplianceTests.cs | Adds code compliance checks for the new library. |
| test/Atc.Rest.AwesomeAssertions.Tests/Atc.Rest.AwesomeAssertions.Tests.csproj | Introduces the new AA test project and references required projects. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/ResultAssertionsTests.cs | Adds assertion tests for ResultAssertions (type/status-code behaviors). |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/OkResultAssertionsTests.cs | Adds assertion tests for OK result content/type assertions. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/NotFoundResultAssertionsTests.cs | Adds assertion tests for 404 result content and error-message assertions. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/NoContentResultAssertionsTests.cs | Adds assertion tests for 204 content assertions. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/CreatedResultAssertionsTests.cs | Adds assertion tests for 201 created result content assertions. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/ContentResultAssertionsTests.cs | Adds assertion tests for generic content result assertions and status-code checks. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/ContentResultAssertionsBaseFixture.cs | Adds shared fixture for constructing JSON ContentResult test subjects. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/ConflictResultAssertionsTests.cs | Adds assertion tests for 409 result content and error-message assertions. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/BadRequestResultAssertionsTests.cs | Adds assertion tests for 400 result content and error-message assertions. |
| test/Atc.Rest.AwesomeAssertions.Tests/Assertions/AcceptedResultAssertionsTests.cs | Adds assertion tests for 202 accepted result content assertions. |
| test/Atc.OpenApi.Tests/Atc.OpenApi.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.DotNet.Tests/Atc.DotNet.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.Console.Spectre.Tests/Atc.Console.Spectre.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.CodeDocumentation.Tests/Atc.CodeDocumentation.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| test/Atc.CodeAnalysis.CSharp.Tests/Atc.CodeAnalysis.CSharp.Tests.csproj | Removes redundant ICSharpCode.Decompiler package reference. |
| src/Atc.Rest.FluentAssertions/README.md | Recommends the new AA package and explains FluentAssertions licensing constraints. |
| src/Atc.Rest.AwesomeAssertions/README.md | Adds documentation for the new AA assertion library. |
| src/Atc.Rest.AwesomeAssertions/GlobalUsings.cs | Adds global usings for AA-based assertion implementation. |
| src/Atc.Rest.AwesomeAssertions/Extensions/ResultBaseExtensions.cs | Adds ResultBase.Should() extension that returns ResultAssertions using AssertionChain. |
| src/Atc.Rest.AwesomeAssertions/AtcRestAwesomeAssertionsAssemblyTypeInitializer.cs | Adds assembly type initializer marker for CodeDoc/compliance tooling. |
| src/Atc.Rest.AwesomeAssertions/Atc.Rest.AwesomeAssertions.csproj | Adds new multi-targeted package project referencing AwesomeAssertions 9.4.0 and Atc.Rest. |
| src/Atc.Rest.AwesomeAssertions/Assertions/ResultAssertions.cs | Implements AA-style assertions for ActionResult and derived result-type helpers. |
| src/Atc.Rest.AwesomeAssertions/Assertions/OkResultAssertions.cs | Implements AA-style assertions for OkObjectResult content/type checks. |
| src/Atc.Rest.AwesomeAssertions/Assertions/NotFoundResultAssertions.cs | Implements AA-style assertions for 404 content result + error-message checks. |
| src/Atc.Rest.AwesomeAssertions/Assertions/NoContentResultAssertions.cs | Implements AA-style assertions for 204 content result. |
| src/Atc.Rest.AwesomeAssertions/Assertions/ForbiddenResultAssertions.cs | Implements AA-style assertions for 403 content result + error-message checks. |
| src/Atc.Rest.AwesomeAssertions/Assertions/ErrorContentResultAssertions.cs | Adds shared error-message assertion logic for error result types. |
| src/Atc.Rest.AwesomeAssertions/Assertions/CreatedResultAssertions.cs | Implements AA-style assertions for 201 content result. |
| src/Atc.Rest.AwesomeAssertions/Assertions/ContentResultAssertionsBase.cs | Implements shared JSON content parsing and typed-content assertions for ContentResult. |
| src/Atc.Rest.AwesomeAssertions/Assertions/ContentResultAssertions.cs | Implements status-code assertions for ContentResult. |
| src/Atc.Rest.AwesomeAssertions/Assertions/ConflictResultAssertions.cs | Implements AA-style assertions for 409 content result + error-message checks. |
| src/Atc.Rest.AwesomeAssertions/Assertions/BadRequestResultAssertions.cs | Implements AA-style assertions for 400 content result + error-message checks. |
| src/Atc.Rest.AwesomeAssertions/Assertions/AcceptedResultAssertions.cs | Implements AA-style assertions for 202 content result. |
| docs/CodeDoc/Atc.Rest.AwesomeAssertions/IndexExtended.md | Adds generated CodeDoc index (extended) for the new AA library. |
| docs/CodeDoc/Atc.Rest.AwesomeAssertions/Index.md | Adds generated CodeDoc index for the new AA library. |
| docs/CodeDoc/Atc.Rest.AwesomeAssertions/Atc.Rest.AwesomeAssertions.md | Adds generated CodeDoc content for the new AA library. |
| Atc.slnx | Registers the new AA library and its test project in the solution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fix pre-existing naming issues carried into both the AwesomeAssertions and FluentAssertions REST assertion test suites (flagged in review): - Doenst -> Doesnt in WithErrorMessage test names. - Does_Not_Throws -> Does_Not_Throw grammar fix. - 'Github' -> 'GitHub' in TODO comments. - BeCreatedResult status-code test names 202 -> 201 (Created is 201). - BeConflictResult passes test name 404 -> 409 (Conflict is 409).
davidkallesen
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
✨ Features
📦 Dependencies
♻️ Refactoring
📝 Documentation
🔥 Removal
Notes
caller fragment (/return Subject.Value); behavior is unchanged.