Skip to main content
Table of Contents

Class TestTenants

Namespace
Stratara.Testing
Assembly
Stratara.Testing.dll

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

slug string

A stable, human-readable label (e.g. "acme", "contoso").

Returns

Guid

The same Guid every time for the same slug.

Exceptions

ArgumentException

slug is null or whitespace.