Repository navigation
Release v4.2.0
Summary
Specifications now ships packages for TUnit, xUnit v3 and NUnit 5 next to the existing xUnit and NUnit packages. All packages share one faster lifecycle implementation, and the existing packages stay compatible with 4.x. See the README for which package to pick.
Added
Cratis.Specifications.TUnitfor writingEstablish/Because/should_specifications on TUnit and Microsoft.Testing.Platform (#60)Cratis.Specifications.XUnit.v3for writing specifications on xUnit v3, including the shared specification lifecycle the xUnit package offers (#62)Cratis.Specifications.NUnit5for writing specifications on NUnit 5. Unlike the NUnit 4 package, itsShouldEqualcompares sequences in order (#63)- Analyzer CRSPEC0008 reports
should_facts that modify the shared specification context. It is reported as info by default and can be raised through.editorconfig(part of #61)
Changed
Establish,BecauseandDestroynow run through a cached invoker shared by all packages, so specifications start faster (part of #61)Should*assertion failure messages are only formatted when an assertion fails (part of #61)- The specification analyzers do less work per symbol, so builds with many specifications are faster (part of #61)
Fixed
Establish,BecauseandDestroydeclared on a base specification no longer run twice (#61)- Exceptions thrown from
Establish,BecauseandDestroyare reported as thrown, not wrapped inTargetInvocationException(part of #61) - Lifecycle methods returning
ValueTaskare now awaited (part of #61) - Building the repository works on any .NET 10 SDK feature band;
global.jsonno longer pins an unavailable SDK version (#50)