Class AdoptedReferenceEndToEndTests
End-to-end EditMode tests adopting REAL shipped systems (never hand-built fixtures) into a shared
scratch output root, proving invariant 3 — adopting a later system repairs references an EARLIER
adoption run left pointing at package content — through the full SystemAdoptionRunner
pipeline: planner, cloner, Id rename, forward remap pass, and back-fill pass, exactly as
SettingsAdoptionFlow drives them.
Inherited Members
Namespace: Serenity.CreateGame.Tests.Editor
Assembly: Serenity.CreateGame.Tests.Editor.dll
Syntax
public class AdoptedReferenceEndToEndTests
Constructors
AdoptedReferenceEndToEndTests()
Declaration
public AdoptedReferenceEndToEndTests()
Methods
AdoptEverything_NoAdoptedAssetStillCarriesAShippedId()
Invariant 1, proven across a real multi-system adoption: every ScriptableObject this run
cloned must carry an adopted (_Project-suffixed) Id, never the shipped one it was cloned
from.
Declaration
public void AdoptEverything_NoAdoptedAssetStillCarriesAShippedId()
AdoptGameSettingsAndMenu_ValidatorReportsNoAdoptedCounterpartWarnings()
The validator's own oracle, restricted to the adopted set (Serenity.CreateGame.Tests.Editor.AdoptedReferenceEndToEndTests.OutputRoot): once a system's referenced counterpart is also adopted, nothing under the output root may still point at a shipped asset that has an adopted sibling.
Declaration
public void AdoptGameSettingsAndMenu_ValidatorReportsNoAdoptedCounterpartWarnings()
AdoptGameSettingsAndMenu_ValidatorReportsNoDanglingReferencesForTheAdoptedSet()
The validator's dangling-reference oracle, restricted to the adopted set — measured against the
SHIPPED BASELINE rather than an absolute zero: the shipped originals of the adopted set may
already carry a genuine authoring defect (as ControlsSettingsMenu.asset does, documented in
FoundationReferenceContractsTests.KnownShippedDefects) that adoption itself did nothing to
cause and cannot repair. What adoption must never do is INTRODUCE a new dangling reference the
shipped original did not already have, so this asserts the adopted set's dangling findings (by
field + value — the same signature identifies a reference across a shipped asset and its clone,
since an unresolved reference is left byte-for-byte as authored) are a SUBSET of the baseline
measured on the shipped sources before adoption ran.
Declaration
public void AdoptGameSettingsAndMenu_ValidatorReportsNoDanglingReferencesForTheAdoptedSet()
AdoptGameSettingsThenUi_ScaleAndFontSizeKeys_PointAtTheAdoptedSettings()
The forward-pass counterpart of AdoptUiThenMenu_UiSettingsInitialViewId_PointsAtTheAdoptedMainMenu(): here the referenced systems (the two game settings) are adopted BEFORE the owner (Ui), so their adopted counterparts already exist in the index by the time Ui's own forward pass walks its clone — no back-fill needed at all.
Declaration
public void AdoptGameSettingsThenUi_ScaleAndFontSizeKeys_PointAtTheAdoptedSettings()
AdoptMenu_ProjectOwnedAssetOutsideTheOutputRoot_IsNeverTouchedByTheBackfill()
The back-fill's own blast-radius guard: a project-owned asset that hosts a contracted
IFoundationSettings type but lives OUTSIDE this adoption's output root must never be
touched, even though it carries the exact same stale reference the in-scope oracle above proves
gets repaired.
Declaration
public void AdoptMenu_ProjectOwnedAssetOutsideTheOutputRoot_IsNeverTouchedByTheBackfill()
AdoptSplashTaskWithItsGuidArgumentRoots_AdoptedTasksStringArgPointsAtTheAdoptedCutscene()
Reproduces the owner's reported defect directly: the real shipped PlayInitSplashScreen task's
stringArgs[0] is the real shipped InitSplash cutscene's Guid — a reference
UnityEditor.AssetDatabase.GetDependencies(System.String,System.Boolean) can never see, since it is a plain
string. Rooting the plan at the task PLUS Serenity.CreateGame.Infrastructure.Editor.Wiring.BootTaskGuidArgumentRoots.ResolveReferencedAssetPaths(System.Collections.Generic.IReadOnlyList{System.String})'s
own result (exactly what ProjectPipelineAdoption does) must adopt the cutscene alongside the
task and re-point the adopted task's argument at the adopted cutscene's own new Guid — never leave
it pointing at the shipped Guid, which is what produced the owner's
"Definition '...' not found" failure at boot.
Declaration
public void AdoptSplashTaskWithItsGuidArgumentRoots_AdoptedTasksStringArgPointsAtTheAdoptedCutscene()
AdoptUiThenMenu_UiSettingsInitialViewId_PointsAtTheAdoptedMainMenu()
The plan's own retroactive-repair oracle: the shipped UiSettings.asset carries
InitialViewId: MainMenu, a plain string never in Ui's own dependency closure. Adopting Ui
alone leaves it stale (Menu was not adopted yet, so the index has no adopted MainMenu to resolve
against); adopting Menu afterwards, into the SAME output root, must back-fill the already-adopted
UiSettings clone to point at the newly adopted MainMenu.
Declaration
public void AdoptUiThenMenu_UiSettingsInitialViewId_PointsAtTheAdoptedMainMenu()
SetUp()
Declaration
public void SetUp()
TearDown()
Declaration
public void TearDown()