Loading
Topic
xUnit structure, test doubles, async behavior, determinism, and maintainable .NET tests.
Practice items tagged with .NET Test Design.
Compares test doubles by purpose and explains when a real dependency provides a more trustworthy test.
Controls nondeterministic inputs without weakening production behavior or hard-coding test-only branches.
Structures xUnit tests around per-test instances and shares only expensive infrastructure through deliberate class, collection, or assembly fixture lifetimes while preserving isolation and parallel safety.
Tests asynchronous completion, caller cancellation, owned timeouts, cleanup, and race-sensitive side effects deterministically with controlled dependencies and bounded diagnostics.