This package contains types for .NET applications to integrate with Antithesis.
- The
Assertclass methods define test properties about your software or workload. - The
Randomclass methods source entropy directly from the Antithesis platform: raw 64-bit values viaGetRandom()and structured list picks viaRandomChoice(). - The
AntithesisRandomclass is a subclass ofSystem.Randomthat encapsulates Antithesis's steering choices, making it easy for .NET code that usesSystem.Randomto be included in Antithesis-guided exploration. - The
Lifecycleclass methods inform the Antithesis environment that particular test phases or milestones have been reached.
For general usage guidance see the Antithesis .NET SDK Documentation.
This .NET 6.0+ Antithesis.SDK package's only dependency is the Antithesis.SDK.SourceGenerators package. The Antithesis.SDK.SourceGenerators package contains a .NET Incremental Source Generator that adds a C# file to each Assembly that references it. The file contains a ModuleInitializer that calls Antithesis.SDK.Catalog for each Antithesis.SDK.Assert method call found during compilation. This informs Antithesis of every assertion regardless of whether the assertion is encountered during runtime.