Verify.Flurl
April 9, 2026 ยท View on GitHub
Extends Verify to allow verification of Flurl bits.
See Milestones for release notes.
Sponsors
Entity Framework Extensions
Entity Framework Extensions is a major sponsor and is proud to contribute to the development this project.
Developed using JetBrains IDEs
NuGet
Usage
Initialize
Call VerifyFlurl.Initialize() in a [ModuleInitializer].
public static class ModuleInitializer
{
[ModuleInitializer]
public static void Initialize() =>
VerifyFlurl.Initialize();
}
Alternatively, use VerifierSettings.InitializePlugins() to initialize all Verify plugins with default settings.
public static class ModuleInitializer
{
[ModuleInitializer]
public static void Initialize() =>
VerifierSettings.InitializePlugins();
}
Test
Given any calls to HttpTest, those call can be verified as follows:
[Fact]
public async Task Usage()
{
using var httpTest = new HttpTest();
httpTest.RespondWith("OK");
await "http://api.mysite.com/".GetAsync();
await "http://api.mysite.com/".PostAsync(new StringContent("the content"));
await Verify(httpTest);
}
Results in:
[
{
Request: http://api.mysite.com/,
Response: {
Status: 200 OK,
Content: {
Headers: {
Content-Length: 2,
Content-Type: text/plain; charset=utf-8
},
Value: OK
}
}
},
{
Request: {
Method: POST,
Uri: http://api.mysite.com/,
Content: {
Headers: {
Content-Length: 11,
Content-Type: text/plain; charset=utf-8
},
Value: the content
}
},
Response: {
Status: 200 OK,
Content: {
Headers: {
Content-Length: 2,
Content-Type: text/plain; charset=utf-8
},
Value: OK
}
}
}
]

