Class CreateGameCameraSettingsWindowAmbiguityAndCollisionTests
Proves CreateGameCameraSettingsWindow's target resolution, built on the shared
Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset/SerenityWizardTargetAssetGui ambiguity gate. GameCamera
settings are a project-wide Serenity.Global.Infrastructure.Editor.SerenityWizardTargetCardinality.SingletonPerProject — the
runtime loads exactly one via UnitySingletonSettingsLoader (see
WiredOrDiscoveredSettings.Resolve in UnityGameCameraInstaller) — so:
- with two existing UnityGameCameraSettings assets, the Ambiguous gate blocks regardless of what Id is typed, with no create-new escape: the only way through is picking one of the two candidates to update;
- clearing "Edit existing" while the Id/output folder still resolve to an asset that already exists on disk blocks the write as a collision instead of silently updating that asset in place under a primary button that still reads "Create".
Inherited Members
Namespace: Serenity.GameCamera.Tests.Editor.Builder
Assembly: Serenity.GameCamera.Tests.Editor.dll
Syntax
public class CreateGameCameraSettingsWindowAmbiguityAndCollisionTests
Constructors
CreateGameCameraSettingsWindowAmbiguityAndCollisionTests()
Declaration
public CreateGameCameraSettingsWindowAmbiguityAndCollisionTests()
Methods
Ambiguous_NoEscapeChosen_StaysBlockedRegardlessOfDraftId()
Regression proof that the Ambiguous gate itself is still enforced: with two existing assets and no escape chosen yet, the Configure step stays blocked no matter what Id is typed on the (still null-backed, unresolved) draft.
Declaration
public void Ambiguous_NoEscapeChosen_StaysBlockedRegardlessOfDraftId()
Ambiguous_PickOneOfTwoCandidates_SeedsFromItAndUpdatesOnlyThatOneLeavingTheOtherByteIdentical()
A singleton target's Ambiguous box offers no create-new escape — creating a third
UnityGameCameraSettings over an unresolved ambiguity would only make boot resolution
worse. The only way through is picking one of the candidates (exactly what
SerenityWizardTargetAssetGui's per-candidate "Pick" button calls): the form re-seeds from the
picked asset, the primary button reads "Update", and confirming updates ONLY that asset, leaving the
other ambiguous candidate byte-identical.
Declaration
public void Ambiguous_PickOneOfTwoCandidates_SeedsFromItAndUpdatesOnlyThatOneLeavingTheOtherByteIdentical()
Cardinality_IsSingletonPerProject()
GameCamera settings resolve through UnitySingletonSettingsLoader at runtime — exactly
one wins project-wide — so the window's own target must state that cardinality, never the
many-per-folder default a by-Id wizard would use.
Declaration
public void Cardinality_IsSingletonPerProject()
OneTimeTearDown()
Declaration
public void OneTimeTearDown()
SetUp()
Declaration
public void SetUp()
SingleExistingAsset_ClearedThenFreeId_CreatesASecondAssetAndLeavesTheFirstUntouched()
Companion to the collision test: after clearing "Edit existing", a genuinely free Id must still create a brand-new second asset without touching the first.
Declaration
public void SingleExistingAsset_ClearedThenFreeId_CreatesASecondAssetAndLeavesTheFirstUntouched()
SingleExistingAsset_ClearedThenIdCollidesWithIt_RefusesTheWriteAndLeavesItByteIdentical()
The write-boundary collision: with exactly one existing asset, clearing "Edit existing" (Pick(null)) while the Id/output folder still resolve to that same asset's own path must refuse the write instead of silently overwriting it under a "Create" label.
Declaration
public void SingleExistingAsset_ClearedThenIdCollidesWithIt_RefusesTheWriteAndLeavesItByteIdentical()
TearDown()
Declaration
public void TearDown()