FluentAssertions.Web
3.0.0
dotnet add package FluentAssertions.Web --version 3.0.0
NuGet\Install-Package FluentAssertions.Web -Version 3.0.0
<PackageReference Include="FluentAssertions.Web" Version="3.0.0" />
<PackageVersion Include="FluentAssertions.Web" Version="3.0.0" />
<PackageReference Include="FluentAssertions.Web" />
paket add FluentAssertions.Web --version 3.0.0
#r "nuget: FluentAssertions.Web, 3.0.0"
#:package FluentAssertions.Web@3.0.0
#addin nuget:?package=FluentAssertions.Web&version=3.0.0
#tool nuget:?package=FluentAssertions.Web&version=3.0.0
FluentAssertions.Web
A FluentAssertions extension over the HttpResponseMessage object. It provides assertions specific to HTTP responses and outputs rich error messages that include the HTTP Request and Response, so test failures show the whole conversation and less time with debugging is spent.
This package targets the FOSS versions of FluentAssertions (< 8.0.0). For the commercial FluentAssertions >= 8.0.0, use FluentAssertions.Web.v8.
Install
dotnet add package FluentAssertions.Web
Example
[Fact]
public async Task Post_ReturnsOk()
{
// Arrange
var client = _factory.CreateClient();
// Act
var response = await client.PostAsync("/api/comments", new StringContent(
"""
{
"author": "John",
"content": "Hey, you..."
}
""", Encoding.UTF8, "application/json"));
// Assert
response.Should().Be200Ok();
}
When the assertion fails, the test output contains the expected and actual status codes followed by the complete HTTP response and the originating HTTP request.
Documentation
The shared Assertions.Web documentation describes the assertions at a glance, the failure output, the configuration and links to the full API and the worked examples in the repository readme.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FluentAssertions (>= 6.5.1 && < 8.0.0)
- HttpMessageFormatter (>= 2.0.6)
- Microsoft.AspNetCore.WebUtilities (>= 2.3.0)
- System.Net.Http.Json (>= 8.0.1)
- System.Text.Encodings.Web (>= 8.0.0)
- System.Text.Json (>= 8.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on FluentAssertions.Web:
| Package | Downloads |
|---|---|
|
Ark.Tools.SpecFlow
SpecfFlow utilities |
GitHub repositories (4)
Showing the top 4 popular GitHub repositories that depend on FluentAssertions.Web:
| Repository | Stars |
|---|---|
|
mehdihadeli/food-delivery-microservices
🍔 A practical and cloud-native food delivery microservices, built with .Net Aspire, .Net 10, Wolverine, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
|
|
|
CodeMazeBlog/CodeMazeGuides
Source code for 800+ C# and .NET articles from code-maze.com. Every article is a runnable solution, most with tests.
|
|
|
mehdihadeli/food-delivery-modular-monolith
🌭 A practical and imaginary food and grocery delivery modular monolith, built with .Net 8, Domain-Driven Design, CQRS, Vertical Slice Architecture, Event-Driven Architecture, and the latest technologies.
|
|
|
mehdihadeli/vertical-slice-api-template
🍰 An asp.net core template based on .Net 10, Vertical Slice Architecture, CQRS, Minimal APIs, OpenTelemetry, API Versioning and OpenAPI.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 3.0.0 | 1,786 | 10/9/2026 |
| 2.0.5 | 900 | 10/7/2026 |
| 2.0.4 | 848 | 10/2/2026 |
| 2.0.3 | 15,670 | 7/30/2026 |
| 2.0.2 | 456 | 7/28/2026 |
| 2.0.1 | 298 | 7/28/2026 |
| 2.0.0 | 563 | 7/23/2026 |
| 1.9.9 | 7,282 | 7/23/2026 |
| 1.9.5 | 362,135 | 5/3/2025 |
| 1.8.0 | 148,217 | 1/20/2025 |
| 1.7.0 | 126,978 | 11/29/2024 |
| 1.5.0 | 162,312 | 9/2/2024 |
| 1.4.0 | 158,055 | 5/24/2024 |
| 0.0.0-ci-286 | 84 | 10/2/2026 |
| 0.0.0-ci-285 | 95 | 10/2/2026 |
| 0.0.0-ci-252 | 128 | 7/23/2026 |