Class TestTenants
Maps human-readable slugs to stable, deterministic Guid tenant ids, so test
assertions stay readable (TestTenants.Of("acme")) while the system still round-trips real
GUID identities. The same slug always yields the same id within and across test runs.
public static class TestTenants
- Inheritance
-
TestTenants
- Inherited Members
Remarks
The id is derived from a SHA-256 hash of the slug (first 16 bytes), not a random or RFC-4122 version-stamped value — its only contract is determinism and per-slug uniqueness. Use it for tenant and user ids alike.
Methods
Of(string)
Return the deterministic id for slug.
public static Guid Of(string slug)
Parameters
slugstringA stable, human-readable label (e.g.
"acme","contoso").
Returns
Exceptions
- ArgumentException
slugis null or whitespace.