0025. A package per test framework for probe rows
- Status: Accepted
- Date: 2026-11-03
Context
Section titled “Context”Issue #25 asks for each probe row to be a test result of its own, in xUnit v3 and TUnit.
Each framework has its own way to make test cases from data: a DataAttribute in xUnit v3,
a data source generator attribute in TUnit. TenantGuard.Testing works with any test
framework today and depends on none.
Decision
Section titled “Decision”- Two packages,
TenantGuard.Testing.XunitV3andTenantGuard.Testing.TUnit, each depending onTenantGuard.Testingand its framework’s extensibility package only. Each has one public type,ProbeRowsAttribute<TSource>, inTenantGuard.Testing(0007). TenantGuard.TestinggainsIProbeSource, the class the attributes create to run the probe, andProbeRow.AssertPassed(), which a test calls on its row. Neither uses a test framework type, so both adapters, and any later one, share them.- The probe runs once per source type per test process, and the attributes share the report.
- The test adapters reference page is the contract.
Consequences
Section titled “Consequences”A project picks the package for its framework and doesn’t pull in the other’s. Six packages are packed, released and checked by the architecture tests. The adapters follow their frameworks’ extensibility APIs, so a framework’s breaking release needs an adapter release. In xUnit v3 the rows appear only once the theory runs; in TUnit the probe runs when tests are discovered.