Breaking Changes
- Dropped support for .NET 6/7, .NET 8+ is required.
- Updated the contract for custom assertions to have better ergonomics:
- public void Assert(Scenario scenario, HttpContext context, ScenarioAssertionException ex)
+ public void Assert(Scenario scenario, AssertionContext context)
{
- var body = ex.ReadBody(context);
+ var body = context.ReadBodyAsString();
if (!body.Contains(Text))
{
- ex.Add($"Expected text '{Text}' was not found in the response body");
+ context.AddFailure($"Expected text '{Text}' was not found in the response body");
}
}
- Removed
AlbaHost.ForStartup<T>
, useAlbaHost.For<T>
instead.
New Features
- Added support for stubbing individual authentication schemes with
JwtSecurityStub
&AuthenticationStub
. - Added
StatusCodeShouldBeSuccess
to built in assertions.
Internal Changes
- Updated the JWT Token stub to generate tokens using ASP.NET Core 8's JsonWebToken. Make sure your project doesn't reference
System.IdentityModel.Tokens.Jwt
as it'll cause things to break. - Removed a number of long-obsolete types.
- Sealed a handful of different types.
- Updated Vitepress to latest (docs)
- Replaced build infrastructure with Nuke.Build
All Changes
- Update Vitepress & deal with CSS breaks by @Hawxy in #147
- Move docs publish to GHA-based workflow by @Hawxy in #148
- .NET 8 Updates by @Hawxy in #151
- Swap build system to nuke by @Hawxy in #152
- remove redundant containskey by @SimonCropp in #156
- fix CVEs by @SimonCropp in #155
- remove redundant stubTypeSpecificClaims state machine by @SimonCropp in #158
- discard some un-used parameters by @SimonCropp in #157
- Update auth implementation to match .NET 8 by @Hawxy in #165
- Move to file-scoped namespaces by @Hawxy in #166
- Add support for stubbing a specific authentication scheme by @Hawxy in #168
- Add AssertionContext by @Hawxy in #167
- Created an Assertion for StatusCodeShouldBeSuccess by @JeffryGonzalez in #161
- Release cleanup by @Hawxy in #169
New Contributors
- @SimonCropp made their first contribution in #156
- @JeffryGonzalez made their first contribution in #161
Full Changelog: v7.4.1...v8.0.0