Namespace Serenity.UnityValidation.Tests.Editor
Classes
AdoptedAssetKeyIndexTests
Pure tests for Serenity.Global.Infrastructure.Editor.Validation.AdoptedAssetKeyIndex — no AssetDatabase, no assets on disk;
BuildAddress is a string operation, so Serenity.Global.Infrastructure.Editor.Validation.AdoptedAssetKeyIndex.FromPathPairs(System.Collections.Generic.IEnumerable{System.ValueTuple{System.String,System.String}}) never
consults the Addressables group.
AssetPathFieldReflectionTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.AssetPathFieldReflection: a top-level match, a depth-1 nested match, a
list-element match (Array.data[N] path), a depth-2 field that must never be recursed into, and
a [NonSerialized] field that must be skipped even though it carries the attribute.
DeclaredReferenceFixtureOwner
A stand-in owner that holds its signals by reference, as a menu holds its submit signals. Not a foundation settings type, so it never enters the project's contract table.
DeclaredReferenceFixtureSignal
Base of the polymorphic stand-in signals the declared-reference walker tests store by reference; each concrete subtype lives in a different kind of namespace on purpose.
DeclaredReferenceFixtureSignalHost
Holds a signal type nested inside it, which Unity names with a slash after the host.
DeclaredReferenceFixtureSignalHost.NestedFixtureSignal
FoundationReferenceCompletenessRatchetTests
The proof that the declared Id/Guid reference statement is complete enough to be acted on without guessing: it loads every shipped foundation asset (ScriptableObjects and prefab components), builds the set of every shipped Id and Guid, and walks every serialized string of every one of them. A string that equals another shipped asset's Id or Guid must be a DECLARED reference (the walker reports it) or be listed in Serenity.UnityValidation.Tests.Editor.FoundationReferenceCompletenessRatchetTests.NotAReference with its reason. A new reference field that nobody declared fails here, naming the owner type and the property path.
FoundationReferenceContractsTests
Anti-drift tests for FoundationReferenceContracts: every row must name a real owner
type, a serialized property that actually resolves on a scratch instance of it, and (when fixed) a
real referenced type implementing IFoundationSettings — the same guarantee
GameSettingWiringMap's own field-reflection test gives its narrower table. Owner types are
resolved purely by name (GetTypeFromCurrentDomainAssemblies(string)), so this
assembly needs no reference to Menu, Modal, GameSettings, Leaderboard, Achievements, Feedback,
GameGraphics, Localization or EventDispatcher — exactly the decoupling SerenityDiscoveryRegistry
already relies on.
FoundationReferenceIndexTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.FoundationReferenceIndex: the shipped-asset-to-adopted-counterpart pairing
rule, and the two resolve maps (Id, Guid) it derives from that pairing. Fixtures live under a scratch
folder nested inside Serenity.Global.Infrastructure.Editor.SerenityEditorPaths.AssetsRoot (so
Serenity.Global.Infrastructure.Editor.Validation.FoundationAssetOwnership.IsProjectOwnedPath(System.String) classifies it as shipped/package content,
exactly like a real Serenity install) and a scratch folder outside it (project-owned/adopted),
mirroring SystemAdoptionRunnerTests's own scratch-root pattern.
FoundationReferenceOwnerDiscoveryTests
What the reference table treats as an owner and what it reads below one: the framework's own
namespaces are excluded on whole name segments, so a customer's Systems.Combat or
UnityEngineExtensions is read like any other.
FoundationReferenceWalkerTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.FoundationReferenceWalker's AssetKey support: a type with no declared
FoundationReferenceContracts row but at least one [AssetPathField] field must
still be walked, emitting one Serenity.Global.Infrastructure.Editor.Validation.FoundationReferenceSite per match with
AssetKey and the attribute's asset type resolved.
SerenityAddressableKeyValidatorTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.SerenityAddressableKeyValidator: an AssetPathFieldAttribute-annotated
string field that stores a raw Assets/... path to an Addressable-eligible target must be flagged
as an error, a key already matching a registered address must not, an unresolvable non-path key must be
a warning rather than an error, and the fix API must resolve the raw-path case.
SerenityAddressableTagValidatorTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.SerenityAddressableTagValidator: a Serenity asset that should be Addressable per
UnityAddressablesLabeler's own rules but isn't must be flagged, and the fix API must resolve it.
SerenityAdoptedReferenceValidatorTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.SerenityAdoptedReferenceValidator. Fixtures follow
FoundationReferenceIndexTests's scratch-root split: a "shipped" fixture lives under
Serenity.Global.Infrastructure.Editor.SerenityEditorPaths.AssetsRoot, a project-owned/adopted one outside it.
SerenityAssetReferenceFinderTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.References.SerenityAssetReferenceFinder: finding ScriptableObject references to a target asset, and nulling them out once that target asset has been deleted.
SerenityAudioRegistrationValidatorTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.SerenityAudioRegistrationValidator: an audio clip definition that exists as an
asset but is absent from its selectable game-settings registry must be flagged, and the fix API must
resolve it. Builds a throwaway registry via ScriptableObject.CreateInstance(string) because
UnityGameSettingsDefinition has no assembly definition of its own — see
Serenity.Global.Infrastructure.Editor.Validation.SerenityAudioRegistrationValidator's class remarks — and targets it explicitly through the
two-registry FixByRegistering overload so the test never touches the project's real
Audio_SoundToTrigger asset.
SerenityBrandingValidatorTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.SerenityBrandingValidator. The scan is pure System.IO (mirrors production),
so fixtures are raw files written directly under Assets and removed with Directory.Delete —
never through AssetDatabase — so Unity never imports or compiles them during the test.
SerenityHealthCheckPrefabIdentityTests
The Health Check reads the Id and Guid of a prefab's own foundation components with the same
rules it applies to ScriptableObjects: empty is a Warning, a duplicate is an Error, a project-owned Id
shadowing a shipped one is Info. A component counts at the prefab that owns it — a nested prefab instance
repeats its source prefab's identity by construction, and a variant's inherited child component belongs to
the base. Every fixture is a real prefab on disk, because the scan is an AssetDatabase sweep.
SerenityHealthCheckValidatorTestSettings
A throwaway IFoundationSettings asset type for SerenityHealthCheckValidatorTests.
Lives in its own same-named file so Unity can bind its script when the tests create it as an asset
(mirrors SerenityAssetIdLookupTestSettings). Deliberately not shared with any other suite —
see that type's docstring for why.
SerenityHealthCheckValidatorTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.SerenityHealthCheckValidator.Run(Serenity.Global.Infrastructure.Editor.Validation.SerenityValidationReport)'s ownership-aware duplicate-Id read: a
shipped asset shadowed by a project-owned clone with the same Id is an Info finding, not an
Error, while a genuine duplicate (both package content, or both project-owned) stays an Error.
Every fixture is a real SerenityHealthCheckValidatorTestSettings asset on disk —
Serenity.Global.Infrastructure.Editor.Validation.SerenityHealthCheckValidator.LoadFoundationAssets is a project-wide
AssetDatabase scan, so nothing here can be faked in-memory.
SerenityProjectValidationRunnerTests
Smoke tests for RunAll(string) against the real project. Exact issue counts depend on project state, so these assert structure (validators ran, JSON parses) rather than counts.
SerenityValidationReportTests
Tests for Serenity.Global.Infrastructure.Editor.Validation.SerenityValidationReport.ToJson — the machine-readable validation result an agent reads to confirm a project is wired correctly. The report's JSON DTOs are private, so these tests parse the JSON into local mirror types and assert on content.