Skip to content

v8.0.0

Latest
Compare
Choose a tag to compare
@Hawxy Hawxy released this 26 Jul 09:11
· 2 commits to master since this release
31f4dd7

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>, use AlbaHost.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

New Contributors

Full Changelog: v7.4.1...v8.0.0